@@ -6,6 +6,7 @@ permissions:
66on :
77 release :
88 types : [created, published, prereleased]
9+ workflow_dispatch : {}
910
1011jobs :
1112 build :
@@ -25,27 +26,34 @@ jobs:
2526 - name : Build tundra-cli
2627 run : cargo build --release -p tundra-cli
2728
28- - name : Package for Linux
29+ # ---------- Linux packaging ----------
30+ - name : Package (Linux)
2931 if : runner.os == 'Linux'
30- id : package
32+ id : package_linux
3133 run : |
3234 cd target/release
3335 tar czvf tundra-cli-${{ github.event.release.tag_name }}-linux-x86_64.tar.gz tundra-cli
34- echo "path=target/release /tundra-cli-${{ github.event.release.tag_name }}-linux-x86_64.tar.gz" >> $GITHUB_OUTPUT
36+ echo "path=$(pwd) /tundra-cli-${{ github.event.release.tag_name }}-linux-x86_64.tar.gz" >> $GITHUB_OUTPUT
3537
36- - name : Package for Windows
38+ - name : Upload asset (Linux)
39+ if : runner.os == 'Linux'
40+ uses : softprops/action-gh-release@v1
41+ with :
42+ files : ${{ steps.package_linux.outputs.path }}
43+
44+ # ---------- Windows packaging ----------
45+ - name : Package (Windows)
3746 if : runner.os == 'Windows'
38- id : package
47+ id : package_windows
3948 shell : pwsh
4049 run : |
41- # compress the .exe into a zip
4250 Compress-Archive -Path target\release\tundra-cli.exe `
4351 -DestinationPath target\release\tundra-cli-${{ github.event.release.tag_name }}-windows-x86_64.zip
44- # record the zip’s path for the next step
4552 Add-Content -Path $env:GITHUB_OUTPUT `
46- -Value "path=target/ release/ tundra-cli-${{ github.event.release.tag_name }}-windows-x86_64.zip"
53+ -Value "path=$(Resolve-Path target\ release\ tundra-cli-${{ github.event.release.tag_name }}-windows-x86_64.zip) "
4754
48- - name : Upload asset to release
55+ - name : Upload asset (Windows)
56+ if : runner.os == 'Windows'
4957 uses : softprops/action-gh-release@v1
5058 with :
51- files : ${{ steps.package .outputs.path }}
59+ files : ${{ steps.package_windows .outputs.path }}
0 commit comments