From 8a7630aead9e1ffc33ffe00ff7aaf5489351ee7c Mon Sep 17 00:00:00 2001 From: anastasiiakozlova245 Date: Fri, 2 Feb 2024 00:24:10 +0100 Subject: [PATCH 1/4] fix: update release pipeline to generate proper checksums --- .github/workflows/release.yml | 38 +++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 86c2d94..bd7da30 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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/release-downloader@v1.9 - with: - tag: ${{ github.ref_name }} - tarBall: true - zipBall: true + run: | + curl -L --output test-goreleaser-$(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 test-goreleaser-$(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: From 099f6caef4dd0122d21ccc6082e4ccabddc56a7e Mon Sep 17 00:00:00 2001 From: anastasiiakozlova245 Date: Fri, 2 Feb 2024 00:26:50 +0100 Subject: [PATCH 2/4] fix: update release pipeline to generate proper checksums --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bd7da30..5b63f83 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,12 +35,12 @@ jobs: steps: - name: Download artifacts run: | - curl -L --output test-goreleaser-$(echo $TAG | sed s/v//).tar.gz \ + 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 test-goreleaser-$(echo $TAG | sed s/v//).zip \ + 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" \ From 5473e4f3ceb933101f543f8671fc1de2cb6fd9ce Mon Sep 17 00:00:00 2001 From: anastasiiakozlova245 Date: Fri, 2 Feb 2024 00:28:49 +0100 Subject: [PATCH 3/4] chore: add changelog file --- .changelog/46.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/46.txt diff --git a/.changelog/46.txt b/.changelog/46.txt new file mode 100644 index 0000000..b366f17 --- /dev/null +++ b/.changelog/46.txt @@ -0,0 +1,3 @@ +```release-note:bug +fix: update checksums generation +``` From b7d2afed48b5225e3df31fdd21f5160031cee109 Mon Sep 17 00:00:00 2001 From: anastasiiakozlova245 Date: Fri, 2 Feb 2024 00:32:28 +0100 Subject: [PATCH 4/4] fix: update checksums generation --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5b63f83..046d2e3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,7 +52,7 @@ jobs: run: ls -la - name: Generate checksum run: | - shasum -a 256 *.tar.gz >> checksums_$version.txt + shasum -a 256 *.tar.gz > checksums_$version.txt shasum -a 256 *.zip >> checksums_$version.txt env: version: ${{ github.ref_name }}