1- name : Release
1+ name : release
22
33on :
4- release :
5- types : [published]
64 workflow_run :
7- workflows : [Build ]
5+ workflows : ["build" ]
86 types :
97 - completed
108
@@ -13,24 +11,39 @@ permissions:
1311 contents : write
1412
1513jobs :
16- release :
14+
15+ assets :
1716 runs-on : ubuntu-latest
17+ if : ${{ (github.event.workflow_run.conclusion == 'success') && (github.event.release.tag_name != '') }}
1818
1919 steps :
2020
21+ - name : Download artifacts
22+ uses : actions/download-artifact@v6
23+ with :
24+ pattern : binaries-*
25+ path : artifacts/
26+ # run-id: ${{ github.event.workflow_run.id }}
27+ github-token : ${{ secrets.GITHUB_TOKEN }}
28+
2129 - name : ' 📦 Publish packages'
30+ # if: ${{ startsWith(github.event.release.tag_name, 'rel-') }}
2231 run : |
2332 cd ${{github.workspace}}
24- env -C build/linux zip -r ../ubuntu-amd64.zip bin/ man/
25- env -C build/linux/static zip -r ../../linux-static-amd64.zip bin/ man/
26- env -C build/macos zip -r ../macos-arm64.zip bin/ man/
27- env -C build/win/x64 zip -r ../../win32-x86_64.zip bin/
28- env -C build/win/x86 zip -r ../../win32-x86.zip bin/
29- gh release upload ${{github.event.release.tag_name}} build/ubuntu-amd64.zip
30- gh release upload ${{github.event.release.tag_name}} build/linux-static-amd64.zip
31- gh release upload ${{github.event.release.tag_name}} build/macos-arm64.zip
32- gh release upload ${{github.event.release.tag_name}} build/win32-x86_64.zip
33- gh release upload ${{github.event.release.tag_name}} build/win32-x86.zip
33+ mkdir -p build
34+ find artifacts/ build/ -ls
35+ env -C artifacts/binaries-linux-x64 zip -r ../../build/ubuntu-amd64.zip bin/ man/
36+ env -C artifacts/binaries-macos zip -r ../../build/macos-arm64.zip bin/ man/
37+ env -C artifacts/binaries-linux-x64 zip -r ../../build/linux-static-amd64.zip bin/ man/
38+ env -C artifacts/binaries-win-x64 zip -r ../../build/win32-x64.zip bin/
39+ env -C artifacts/binaries-win-x86 zip -r ../../build/win32-x86.zip bin/
40+ #[ -n "${{github.event.release.tag_name}}" ] && refname="${{github.event.release.tag_name}}" || refname="${{github.ref_name}}"
41+ refname="${{github.event.release.tag_name}}"
42+ gh release upload "$refname" build/ubuntu-amd64.zip
43+ gh release upload "$refname" build/linux-static-amd64.zip
44+ gh release upload "$refname" build/macos-arm64.zip
45+ gh release upload "$refname" build/win32-x64.zip
46+ gh release upload "$refname" build/win32-x86.zip
3447 env :
3548 GITHUB_TOKEN : ${{ github.TOKEN }}
3649 shell : bash
0 commit comments