|
9 | 9 | workflow_dispatch: |
10 | 10 | inputs: |
11 | 11 | tag: |
12 | | - description: "Which tag to deploy as:" |
| 12 | + description: "Version:" |
13 | 13 | required: true |
14 | 14 | push: |
15 | 15 | tags: |
|
21 | 21 | name: Create GitHub Release |
22 | 22 | runs-on: ubuntu-latest |
23 | 23 | steps: |
| 24 | + |
24 | 25 | - name: Create artifacts directory |
25 | 26 | run: mkdir artifacts |
26 | 27 |
|
|
33 | 34 | else |
34 | 35 | echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV |
35 | 36 | fi |
| 37 | +
|
36 | 38 | - name: Validate version environment variable |
37 | 39 | run: | |
38 | 40 | echo "Version being built against is version ${{ env.VERSION }}"! |
| 41 | +
|
39 | 42 | - name: Create GitHub release |
40 | 43 | id: release |
41 | 44 | uses: actions/create-release@v1 |
@@ -127,18 +130,18 @@ jobs: |
127 | 130 | shell: bash |
128 | 131 | run: | |
129 | 132 | cp target/release/pc.exe pc.exe |
130 | | - 7z a pc_windows.zip "pc.exe" |
131 | | - 7z a pc_windows.zip "README.md" |
132 | | - 7z a pc_windows.zip "LICENSE" |
133 | | - echo "ASSET=pc_windows.zip" >> $GITHUB_ENV |
| 133 | + 7z a pc_${{ env.RELEASE_VERSION }}_${{ matrix.build }}.zip "pc.exe" |
| 134 | + 7z a pc_${{ env.RELEASE_VERSION }}_${{ matrix.build }}.zip "README.md" |
| 135 | + 7z a pc_${{ env.RELEASE_VERSION }}_${{ matrix.build }}.zip "LICENSE" |
| 136 | + echo "ASSET=pc_${{ env.RELEASE_VERSION }}_${{ matrix.build }}.zip" >> $GITHUB_ENV |
134 | 137 |
|
135 | 138 | - name: Bundle release (Linux and macOS) |
136 | 139 | if: matrix.os != 'windows-latest' |
137 | 140 | shell: bash |
138 | 141 | run: | |
139 | 142 | cp target/release/pc ./pc |
140 | | - tar -czvf pc_${{ matrix.build }}.tar.gz pc README.md LICENSE |
141 | | - echo "ASSET=pc_${{ matrix.build }}.tar.gz" >> $GITHUB_ENV |
| 143 | + tar -czvf pc_${{ env.RELEASE_VERSION }}_${{ matrix.build }}.tar.gz pc README.md LICENSE |
| 144 | + echo "ASSET=pc_${{ env.RELEASE_VERSION }}_${{ matrix.build }}.tar.gz" >> $GITHUB_ENV |
142 | 145 |
|
143 | 146 | - name: Upload main release |
144 | 147 | uses: actions/upload-release-asset@v1.0.1 |
|
0 commit comments