Skip to content

Commit a41cec3

Browse files
committed
convert branch slashes to dashes
1 parent e01ab15 commit a41cec3

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.github/workflows/build-reusable.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v4
1212

13+
- name: Sanitize branch name for artifact naming
14+
id: sanitize
15+
run: echo "ref_name=$(echo '${{ github.ref_name }}' | sed 's/\//-/g')" >> $GITHUB_OUTPUT
16+
1317
- name: Cache SDL
1418
uses: actions/cache@v4
1519
with:
@@ -21,6 +25,8 @@ jobs:
2125
brew install cmake pkg-config nasm
2226
2327
- name: Build macOS (x86_64 + arm64)
28+
env:
29+
GITHUB_REF_NAME: ${{ steps.sanitize.outputs.ref_name }}
2430
run: |
2531
cd MacOS
2632
make clean
@@ -29,7 +35,7 @@ jobs:
2935
- name: Upload macOS build artifact
3036
uses: actions/upload-artifact@v4
3137
with:
32-
name: Kiwi8-${{ github.ref_name }}-macOS
38+
name: Kiwi8-${{ steps.sanitize.outputs.ref_name }}-macOS
3339
path: MacOS/release/
3440
retention-days: 7
3541

@@ -38,6 +44,11 @@ jobs:
3844
steps:
3945
- uses: actions/checkout@v4
4046

47+
- name: Sanitize branch name for artifact naming
48+
id: sanitize
49+
shell: pwsh
50+
run: echo "ref_name=$('${{ github.ref_name }}'.Replace('/', '-'))" >> $env:GITHUB_OUTPUT
51+
4152
- name: Cache SDL
4253
uses: actions/cache@v4
4354
with:
@@ -50,6 +61,8 @@ jobs:
5061
arch: amd64
5162

5263
- name: Build Windows (x64)
64+
env:
65+
GITHUB_REF_NAME: ${{ steps.sanitize.outputs.ref_name }}
5366
shell: cmd
5467
run: |
5568
cd Windows
@@ -59,6 +72,6 @@ jobs:
5972
- name: Upload Windows build artifact
6073
uses: actions/upload-artifact@v4
6174
with:
62-
name: Kiwi8-${{ github.ref_name }}-Windows
75+
name: Kiwi8-${{ steps.sanitize.outputs.ref_name }}-Windows
6376
path: Windows\release\
6477
retention-days: 7

0 commit comments

Comments
 (0)