Skip to content

Commit

Permalink
Merge pull request #18 from circleci/fix-deploy
Browse files Browse the repository at this point in the history
Cache deb package of goreleaser since binary is installed with sudo
  • Loading branch information
Zachary Scott authored Jun 13, 2018
2 parents b001566 + 643b3cf commit 79b76de
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,12 @@ jobs:
steps:
- checkout
- restore_cache:
keys: [v1-goreleaser-]
keys: [v2-goreleaser-]
- run:
name: Install GoReleaser
command: |
[[ -e goreleaser ]] && exit
curl --silent --location --fail --retry 3 $GORELEASER_URL > /tmp/goreleaser_amd64.deb
sudo apt install /tmp/goreleaser_amd64.deb
[ -f ~/goreleaser_amd64.db ] || curl --silent --location --fail --retry 3 $GORELEASER_URL > ~/goreleaser_amd64.deb
sudo apt install ~/goreleaser_amd64.deb
- run:
name: Tag Repo
command: |
Expand All @@ -96,5 +95,5 @@ jobs:
name: Release
command: goreleaser
- save_cache:
key: v1-goreleaser-{{ checksum "/usr/local/bin/goreleaser" }}
paths: [/usr/local/bin/goreleaser]
key: v2-goreleaser-{{ checksum "~/goreleaser_amd64.deb" }}
paths: [~/goreleaser_amd64.deb]

0 comments on commit 79b76de

Please sign in to comment.