Skip to content

Commit 5a76e06

Browse files
Generate released archives checksum
Fix #343
1 parent c447036 commit 5a76e06

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Actions to run when releasing
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
env:
8+
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
9+
GITHUB_REF_NAME: ${{ github.ref_name }}
10+
11+
jobs:
12+
# Remark : https://github.com/orgs/community/discussions/46034
13+
add-checksum:
14+
runs-on: ubuntu-latest
15+
steps:
16+
# It is necessary to checkout the repository for GitHub CLI to know which repository to target
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
- name: ZIP checksum
20+
run: |
21+
gh release download --archive=zip
22+
shasum -a 256 *.zip > fesapi-${GITHUB_REF_NAME#v}.zip.sha256.txt
23+
gh release upload ${{ github.ref_name }} fesapi-${GITHUB_REF_NAME#v}.zip.sha256.txt
24+
- name: TAR.GZ checksum
25+
run: |
26+
gh release download --archive=tar.gz
27+
shasum -a 256 *.tar.gz > fesapi-${GITHUB_REF_NAME#v}.tar.gz.sha256.txt
28+
gh release upload ${{ github.ref_name }} fesapi-${GITHUB_REF_NAME#v}.tar.gz.sha256.txt
29+

0 commit comments

Comments
 (0)