Skip to content

Commit 7992b22

Browse files
committed
GHA: Suffix release archives with tag instead of sha
1 parent 9ca24bc commit 7992b22

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
version-suffix:
77
required: true
88
type: string
9+
archive-suffix:
10+
required: true
11+
type: string
912

1013
jobs:
1114
build:
@@ -20,7 +23,7 @@ jobs:
2023
DOTNET_CLI_TELEMETRY_OPTOUT: true
2124
restore_args: --runtime ${{ matrix.target-runtime }}
2225
build_args: --no-self-contained --configuration ${{ matrix.configuration }} --version-suffix '${{ inputs.version-suffix }}' --property:IncludeSourceRevisionInInformationalVersion=false
23-
archive_name: Z64Utils-${{ matrix.target-runtime }}-${{ matrix.configuration }}-${{ github.sha }}
26+
archive_name: Z64Utils-${{ matrix.target-runtime }}-${{ matrix.configuration }}-${{ inputs.archive-suffix }}
2427
steps:
2528
- uses: actions/checkout@v4
2629
with:

.github/workflows/pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ jobs:
99
uses: ./.github/workflows/build.yml
1010
with:
1111
version-suffix: ${{ github.sha }}
12+
archive-suffix: ${{ github.sha }}

.github/workflows/push.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@ jobs:
1111
uses: ./.github/workflows/build.yml
1212
with:
1313
version-suffix: ${{ github.sha }}
14+
archive-suffix: ${{ github.sha }}
1415

1516
build-release:
1617
if: startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/tags/nightly'
1718
uses: ./.github/workflows/build.yml
1819
with:
1920
version-suffix: ''
21+
archive-suffix: ${{ github.ref_name }}
2022

2123
nightly-release:
2224
if: github.ref == 'refs/heads/master'

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Create release
2020
uses: softprops/action-gh-release@v2
2121
with:
22-
tag_name: ${{ vars.GITHUB_REF_NAME }}
23-
name: Z64Utils ${{ vars.GITHUB_REF_NAME }}
22+
tag_name: ${{ github.ref_name }}
23+
name: Z64Utils ${{ github.ref_name }}
2424
files: |
2525
${{ steps.release_info.outputs.files }}

0 commit comments

Comments
 (0)