Skip to content

Commit a141322

Browse files
committed
Formatting and better asset names
1 parent 084d3ce commit a141322

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

‎.github/workflows/release.yaml‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
workflow_dispatch:
1010
inputs:
1111
tag:
12-
description: "Which tag to deploy as:"
12+
description: "Version:"
1313
required: true
1414
push:
1515
tags:
@@ -21,6 +21,7 @@ jobs:
2121
name: Create GitHub Release
2222
runs-on: ubuntu-latest
2323
steps:
24+
2425
- name: Create artifacts directory
2526
run: mkdir artifacts
2627

@@ -33,9 +34,11 @@ jobs:
3334
else
3435
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
3536
fi
37+
3638
- name: Validate version environment variable
3739
run: |
3840
echo "Version being built against is version ${{ env.VERSION }}"!
41+
3942
- name: Create GitHub release
4043
id: release
4144
uses: actions/create-release@v1
@@ -127,18 +130,18 @@ jobs:
127130
shell: bash
128131
run: |
129132
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
134137
135138
- name: Bundle release (Linux and macOS)
136139
if: matrix.os != 'windows-latest'
137140
shell: bash
138141
run: |
139142
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
142145
143146
- name: Upload main release
144147
uses: actions/upload-release-asset@v1.0.1

0 commit comments

Comments
 (0)