Skip to content
This repository was archived by the owner on Sep 17, 2023. It is now read-only.

Commit d747c97

Browse files
committed
fix: add checksum to GitHub releases
Issue #102
1 parent 0e49349 commit d747c97

File tree

2 files changed

+38
-8
lines changed

2 files changed

+38
-8
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,17 @@ jobs:
140140
cp target/${{ matrix.triple.target }}/release/monorepo builds/typescript-tools-${{ matrix.triple.target }}/
141141
tar -C builds -czvf dist/typescript-tools-${{ matrix.triple.target }}.tar.gz typescript-tools-${{ matrix.triple.target }}
142142
143-
- name: Upload release artifact
143+
- name: Create checksum
144+
run: shasum --algorithm 256 --binary typescript-tools-${{ matrix.triple.target }}.tar.gz > typescript-tools-${{ matrix.triple.target }}-SHASUM256.txt
145+
working-directory: ./dist
146+
147+
- name: Upload release artifacts
144148
uses: actions/upload-artifact@v3
145149
with:
146-
name: typescript-tools-${{ matrix.triple.target }}.tar.gz
147-
path: dist/typescript-tools-${{ matrix.triple.target }}.tar.gz
150+
name: ${{ matrix.triple.target }}
151+
path: |
152+
dist/typescript-tools-${{ matrix.triple.target }}.tar.gz
153+
dist/typescript-tools-${{ matrix.triple.target }}-SHASUM256.txt
148154
if-no-files-found: error
149155
retention-days: 1
150156

@@ -169,6 +175,10 @@ jobs:
169175
with:
170176
path: dist
171177

178+
- name: Display downloaded release artifacts
179+
run: ls -R
180+
working-directory: dist
181+
172182
- name: Invoke semantic-release
173183
env:
174184
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.releaserc.json

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,44 @@
3636
{
3737
"assets": [
3838
{
39-
"path": "dist/typescript-tools-x86_64-unknown-linux-musl.tar.gz",
39+
"path": "dist/x86_64-unknown-linux-musl/typescript-tools-x86_64-unknown-linux-musl.tar.gz",
4040
"label": "x86_64-unknown-linux-musl"
4141
},
4242
{
43-
"path": "dist/typescript-tools-i686-unknown-linux-musl.tar.gz",
43+
"path": "dist/x86_64-unknown-linux-musl/typescript-tools-x86_64-unknown-linux-musl-SHASUM256.txt",
44+
"label": "x86_64-unknown-linux-musl-SHASUM256"
45+
},
46+
{
47+
"path": "dist/i686-unknown-linux-musl/typescript-tools-i686-unknown-linux-musl.tar.gz",
4448
"label": "i686-unknown-linux-musl"
4549
},
4650
{
47-
"path": "dist/typescript-tools-x86_64-apple-darwin.tar.gz",
51+
"path": "dist/i686-unknown-linux-musl/typescript-tools-i686-unknown-linux-musl-SHASUM256.txt",
52+
"label": "i686-unknown-linux-musl-SHASUM256"
53+
},
54+
{
55+
"path": "dist/x86_64-apple-darwin/typescript-tools-x86_64-apple-darwin.tar.gz",
4856
"label": "x86_64-apple-darwin"
4957
},
5058
{
51-
"path": "dist/typescript-tools-aarch64-unknown-linux-musl.tar.gz",
59+
"path": "dist/x86_64-apple-darwin/typescript-tools-x86_64-apple-darwin-SHASUM256.txt",
60+
"label": "x86_64-apple-darwin-SHASUM256"
61+
},
62+
{
63+
"path": "dist/aarch64-unknown-linux-musl/typescript-tools-aarch64-unknown-linux-musl.tar.gz",
5264
"label": "aarch64-unknown-linux-musl"
5365
},
5466
{
55-
"path": "dist/typescript-tools-aarch64-apple-darwin.tar.gz",
67+
"path": "dist/aarch64-unknown-linux-musl/typescript-tools-aarch64-unknown-linux-musl-SHASUM256.txt",
68+
"label": "aarch64-unknown-linux-musl-SHASUM256"
69+
},
70+
{
71+
"path": "dist/aarch64-apple-darwin/typescript-tools-aarch64-apple-darwin.tar.gz",
5672
"label": "aarch64-apple-darwin"
73+
},
74+
{
75+
"path": "dist/aarch64-apple-darwin/typescript-tools-aarch64-apple-darwin-SHASUM256.txt",
76+
"label": "aarch64-apple-darwin-SHASUM256"
5777
}
5878
]
5979
}

0 commit comments

Comments
 (0)