34
34
env :
35
35
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
36
36
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 }}
39
39
# draft: ${{ github.event_name == 'workflow_dispatch' }}
40
40
draft : true
41
41
prerelease : false
72
72
- name : Checkout repository
73
73
uses : actions/checkout@v3
74
74
75
- - id : release-version
76
- name : Compute version
77
- run : echo v=${{ github.event_name == 'workflow_dispatch' && 'main' || github.ref }} >> "$GITHUB_OUTPUT"
78
-
79
75
- name : Install Rust
80
76
uses : dtolnay/rust-toolchain@master
81
77
with :
@@ -96,12 +92,12 @@ jobs:
96
92
- name : Tar release (unix)
97
93
if : matrix.os != 'windows-latest'
98
94
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"
100
96
101
97
- name : Zip Windows release
102
98
if : matrix.os == 'windows-latest'
103
99
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"
105
101
106
102
- name : Upload release archive (unix)
107
103
if : matrix.os != 'windows-latest'
@@ -110,8 +106,8 @@ jobs:
110
106
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
111
107
with :
112
108
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
115
111
asset_content_type : application/octet-stream
116
112
117
113
- name : Upload Windows release archive
@@ -121,6 +117,6 @@ jobs:
121
117
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
122
118
with :
123
119
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
126
122
asset_content_type : application/octet-stream
0 commit comments