-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from tofuutils/fix/checksums
fix: update release pipeline to generate proper checksums
- Loading branch information
Showing
2 changed files
with
28 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:bug | ||
fix: update checksums generation | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ permissions: | |
jobs: | ||
goreleaser: | ||
name: 'Release the latest tag' | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
@@ -28,22 +28,34 @@ jobs: | |
args: release --clean -f ${{ vars.GORELEASER_CONFIG_PATH }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOFUENV_GITHUB_TOKEN }} | ||
checksums: | ||
name: 'Generate release checksums' | ||
needs: goreleaser | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Download artifacts | ||
uses: robinraju/[email protected] | ||
with: | ||
tag: ${{ github.ref_name }} | ||
tarBall: true | ||
zipBall: true | ||
run: | | ||
curl -L --output tofuenv-$(echo $TAG | sed s/v//).tar.gz \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer $GITHUB_TOKEN" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://github.com/$GITHUB_REPOSITORY/archive/refs/tags/$TAG.tar.gz | ||
curl -L --output tofuenv-$(echo $TAG | sed s/v//).zip \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer $GITHUB_TOKEN" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://github.com/$GITHUB_REPOSITORY/archive/refs/tags/$TAG.zip | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TOFUENV_GITHUB_TOKEN }} | ||
TAG: ${{ github.ref_name }} | ||
- name: Check contents | ||
run: ls -la | ||
- name: Generate checksum | ||
uses: jmgilman/actions-generate-checksum@v1 | ||
with: | ||
patterns: | | ||
*.zip | ||
*.tar.gz | ||
method: sha256 | ||
output: checksums_${{ github.ref_name }}.txt | ||
run: | | ||
shasum -a 256 *.tar.gz > checksums_$version.txt | ||
shasum -a 256 *.zip >> checksums_$version.txt | ||
env: | ||
version: ${{ github.ref_name }} | ||
- name: Upload checksum to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
|