Skip to content

Commit c3e679b

Browse files
author
Toyota Yaris 2009
committed
fix: add platform-specific executable handling in workflow
1 parent 514d1f9 commit c3e679b

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

.github/workflows/build-and-release.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ jobs:
1010
strategy:
1111
matrix:
1212
os: [ubuntu-latest, windows-latest, macos-latest]
13+
include:
14+
- os: windows-latest
15+
executable: PicoCalc-SD-Formatter.exe
16+
- os: macos-latest
17+
executable: PicoCalc-SD-Formatter.app
18+
- os: ubuntu-latest
19+
executable: PicoCalc-SD-Formatter
1320
runs-on: ${{ matrix.os }}
1421
permissions:
1522
contents: write
@@ -41,16 +48,29 @@ jobs:
4148
run: |
4249
python build.py
4350
51+
- name: Verify build output
52+
shell: bash
53+
run: |
54+
if [ "${{ matrix.os }}" = "windows-latest" ]; then
55+
test -f "dist/${{ matrix.executable }}" || { echo "Build failed: Windows executable not found"; exit 1; }
56+
elif [ "${{ matrix.os }}" = "macos-latest" ]; then
57+
test -d "dist/${{ matrix.executable }}" || { echo "Build failed: macOS app bundle not found"; exit 1; }
58+
else
59+
test -f "dist/${{ matrix.executable }}" || { echo "Build failed: Linux executable not found"; exit 1; }
60+
fi
61+
4462
- name: List build output
4563
shell: bash
4664
run: |
4765
ls -la dist/
48-
66+
4967
- name: Upload executable files
5068
uses: actions/upload-artifact@v4
5169
with:
5270
name: executables-${{ matrix.os }}
53-
path: dist/
71+
path: |
72+
dist/${{ matrix.executable }}
73+
dist/VERSION.txt
5474
if-no-files-found: error
5575
retention-days: 5
5676

0 commit comments

Comments
 (0)