Skip to content

Commit

Permalink
.github/workflows: Switch release workflow to setup-hc-releases action (
Browse files Browse the repository at this point in the history
  • Loading branch information
bflad authored Jun 24, 2021
1 parent 7070dc5 commit cfbfee8
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,9 @@ jobs:
env:
VERSION: v0
-
name: Install hc-releases
run: |
DOWNLOAD_URL=$(curl -SsL \
-H "Authorization: token ${{ secrets.CODESIGN_GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/hashicorp/hc-releases/releases/latest \
| jq -r '.assets[] | select(.name | contains("linux_amd64.tgz")) | .url')
curl -SsL -o /tmp/hc-releases.tgz \
-H "Authorization: token ${{ secrets.CODESIGN_GITHUB_TOKEN }}" \
-H "Accept: application/octet-stream" ${DOWNLOAD_URL}
tar xzf /tmp/hc-releases.tgz
sudo mv hc-releases /usr/bin/hc-releases
hc-releases version
uses: hashicorp/setup-hc-releases@v1
with:
github-token: ${{ secrets.CODESIGN_GITHUB_TOKEN }}
-
name: Import key for archive signing
run: echo -e "${{ secrets.GPG_PRIVATE_KEY_DECRYPTED }}" | gpg --import --batch --no-tty
Expand Down

0 comments on commit cfbfee8

Please sign in to comment.