-
-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (42 loc) · 1.15 KB
/
Copy pathchecksum.yml
File metadata and controls
53 lines (42 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Checksum
on:
workflow_call:
inputs:
version:
required: true
type: string
permissions:
contents: read
jobs:
cli:
name: CLI
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/download-artifact@v8
name: Download Release Archives
with:
pattern: gitfleet-v${{ inputs.version }}-*
path: dist
merge-multiple: true
- run: |
set -euo pipefail
find dist -maxdepth 1 -type f \( -name '*.tar.gz' -o -name '*.zip' \) | sort > archives.txt
if [ "$(wc -l < archives.txt)" -ne 6 ]; then
echo "expected 6 release archives" >&2
cat archives.txt >&2
exit 1
fi
(
cd dist
while read -r archive; do
sha256sum "$(basename "$archive")"
done < ../archives.txt > SHA256SUMS
)
name: Generate Checksums
- uses: actions/upload-artifact@v7
name: Upload Checksums
with:
name: gitfleet-v${{ inputs.version }}-checksums
path: dist/SHA256SUMS
if-no-files-found: error