Skip to content

Commit 1cc5fe7

Browse files
committed
Polish release asset names and add ggwave checksums
1 parent 8dfa0af commit 1cc5fe7

2 files changed

Lines changed: 29 additions & 7 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ jobs:
5959
PKG_CONFIG_PATH: /usr/local/lib/pkgconfig
6060

6161
- name: Package
62-
run: tar czf ggwave_linux_amd64.tar.gz ggwave
62+
run: tar czf ggwave-linux-amd64.tar.gz ggwave
6363

6464
- name: Upload to release
65-
run: gh release upload ${{ github.ref_name }} ggwave_linux_amd64.tar.gz --clobber
65+
run: gh release upload ${{ github.ref_name }} ggwave-linux-amd64.tar.gz --clobber
6666
env:
6767
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6868

@@ -95,10 +95,10 @@ jobs:
9595
PKG_CONFIG_PATH: /usr/local/lib/pkgconfig
9696

9797
- name: Package
98-
run: tar czf ggwave_darwin_arm64.tar.gz ggwave
98+
run: tar czf ggwave-darwin-arm64.tar.gz ggwave
9999

100100
- name: Upload to release
101-
run: gh release upload ${{ github.ref_name }} ggwave_darwin_arm64.tar.gz --clobber
101+
run: gh release upload ${{ github.ref_name }} ggwave-darwin-arm64.tar.gz --clobber
102102
env:
103103
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
104104

@@ -145,9 +145,28 @@ jobs:
145145
146146
- name: Package
147147
shell: pwsh
148-
run: Compress-Archive -Path ggwave.exe -DestinationPath ggwave_windows_amd64.zip
148+
run: Compress-Archive -Path ggwave.exe -DestinationPath ggwave-windows-amd64.zip
149149

150150
- name: Upload to release
151-
run: gh release upload ${{ github.ref_name }} ggwave_windows_amd64.zip --clobber
151+
run: gh release upload ${{ github.ref_name }} ggwave-windows-amd64.zip --clobber
152+
env:
153+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
154+
155+
ggwave-checksums:
156+
needs: [ggwave-linux, ggwave-macos, ggwave-windows]
157+
runs-on: ubuntu-latest
158+
steps:
159+
- name: Download ggwave assets
160+
run: gh release download "$GITHUB_REF_NAME" -R "$GITHUB_REPOSITORY" -p 'ggwave-*.tar.gz' -p 'ggwave-*.zip' -D dist
161+
env:
162+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
163+
164+
- name: Generate checksums
165+
working-directory: dist
166+
run: sha256sum ggwave-*.tar.gz ggwave-*.zip > "ggwave-${GITHUB_REF_NAME#v}-checksums.txt"
167+
168+
- name: Upload to release
169+
working-directory: dist
170+
run: gh release upload "$GITHUB_REF_NAME" "ggwave-${GITHUB_REF_NAME#v}-checksums.txt" --clobber
152171
env:
153172
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

‎.goreleaser.yaml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,14 @@ builds:
3030
archives:
3131
- formats:
3232
- tar.gz
33-
name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}'
33+
name_template: '{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}'
3434
format_overrides:
3535
- goos: windows
3636
formats:
3737
- zip
3838

39+
checksum:
40+
name_template: '{{ .ProjectName }}-{{ .Version }}-checksums.txt'
41+
3942
changelog:
4043
sort: asc

0 commit comments

Comments
 (0)