3434 env :
3535 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3636 with :
37- tag_name : ${{ github.event_name == 'workflow_dispatch' && '' || github.ref }}
38- release_name : Release ${{ github.event_name == 'workflow_dispatch' && 'main' || github.ref }}
37+ tag_name : ${{ github.ref_name }}
38+ release_name : Release ${{ github.ref_name }}
3939 # draft: ${{ github.event_name == 'workflow_dispatch' }}
4040 draft : true
4141 prerelease : false
7272 - name : Checkout repository
7373 uses : actions/checkout@v3
7474
75- - id : release-version
76- name : Compute version
77- run : echo v=${{ github.event_name == 'workflow_dispatch' && 'main' || github.ref }} >> "$GITHUB_OUTPUT"
78-
7975 - name : Install Rust
8076 uses : dtolnay/rust-toolchain@master
8177 with :
@@ -96,12 +92,12 @@ jobs:
9692 - name : Tar release (unix)
9793 if : matrix.os != 'windows-latest'
9894 working-directory : ./target/${{ matrix.target }}/release
99- run : tar cvfz bandwhich-${{ steps.release-version.outputs.v }}-${{matrix.target}}.tar.gz "bandwhich"
95+ run : tar cvfz bandwhich-${{ github.ref_name }}-${{matrix.target}}.tar.gz "bandwhich"
10096
10197 - name : Zip Windows release
10298 if : matrix.os == 'windows-latest'
10399 working-directory : ./target/${{ matrix.target }}/release
104- run : tar.exe -a -c -f bandwhich-${{ steps.release-version.outputs.v }}-${{matrix.target}}.zip "bandwhich.exe"
100+ run : tar.exe -a -c -f bandwhich-${{ github.ref_name }}-${{matrix.target}}.zip "bandwhich.exe"
105101
106102 - name : Upload release archive (unix)
107103 if : matrix.os != 'windows-latest'
@@ -110,8 +106,8 @@ jobs:
110106 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
111107 with :
112108 upload_url : ${{ needs.create-release.outputs.upload_url }}
113- asset_path : ./target/${{ matrix.target }}/release/bandwhich-${{ steps.release-version.outputs.v }}-${{matrix.target}}.tar.gz
114- asset_name : bandwhich-${{ steps.release-version.outputs.v }}-${{matrix.target}}.tar.gz
109+ asset_path : ./target/${{ matrix.target }}/release/bandwhich-${{ github.ref_name }}-${{matrix.target}}.tar.gz
110+ asset_name : bandwhich-${{ github.ref_name }}-${{matrix.target}}.tar.gz
115111 asset_content_type : application/octet-stream
116112
117113 - name : Upload Windows release archive
@@ -121,6 +117,6 @@ jobs:
121117 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
122118 with :
123119 upload_url : ${{ needs.create-release.outputs.upload_url }}
124- asset_path : ./target/${{ matrix.target }}/release/bandwhich-${{ steps.release-version.outputs.v }}-${{matrix.target}}.zip
125- asset_name : bandwhich-${{ steps.release-version.outputs.v }}-${{matrix.target}}.zip
120+ asset_path : ./target/${{ matrix.target }}/release/bandwhich-${{ github.ref_name }}-${{matrix.target}}.zip
121+ asset_name : bandwhich-${{ github.ref_name }}-${{matrix.target}}.zip
126122 asset_content_type : application/octet-stream
0 commit comments