Skip to content

Commit ea59fb0

Browse files
committed
fix(infra): name release binaries uniquely
Why: - GitHub release assets require unique filenames - avoid overwrite errors in action-gh-release Impact: - build job writes target-specific filenames - release uploads pre-named binaries - Tests: just check
1 parent 7c6874a commit ea59fb0

1 file changed

Lines changed: 17 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,19 +209,33 @@ jobs:
209209
args: "--locked --release --package intar-cli --bin intar"
210210
strip: true
211211

212+
- name: Prepare binary (Unix)
213+
if: runner.os != 'Windows'
214+
run: |
215+
mkdir -p dist
216+
cp target/${{ matrix.platform.target }}/release/intar dist/intar-${{ matrix.platform.target }}
217+
chmod +x dist/intar-${{ matrix.platform.target }}
218+
219+
- name: Prepare binary (Windows)
220+
if: runner.os == 'Windows'
221+
shell: pwsh
222+
run: |
223+
New-Item -ItemType Directory -Force dist | Out-Null
224+
Copy-Item "target\\${{ matrix.platform.target }}\\release\\intar.exe" "dist\\intar-${{ matrix.platform.target }}.exe"
225+
212226
- name: Upload binary (Unix)
213227
if: runner.os != 'Windows'
214228
uses: actions/upload-artifact@v6
215229
with:
216230
name: intar-${{ matrix.platform.target }}
217-
path: target/${{ matrix.platform.target }}/release/intar
231+
path: dist/intar-${{ matrix.platform.target }}
218232

219233
- name: Upload binary (Windows)
220234
if: runner.os == 'Windows'
221235
uses: actions/upload-artifact@v6
222236
with:
223237
name: intar-${{ matrix.platform.target }}
224-
path: target/${{ matrix.platform.target }}/release/intar.exe
238+
path: dist/intar-${{ matrix.platform.target }}.exe
225239

226240
release:
227241
name: Release
@@ -241,8 +255,7 @@ jobs:
241255
uses: softprops/action-gh-release@v2
242256
with:
243257
files: |
244-
dist/*/intar
245-
dist/*/intar.exe
258+
dist/*/intar-*
246259
generate_release_notes: true
247260

248261
e2e:

0 commit comments

Comments
 (0)