Skip to content

Commit 3dc357c

Browse files
authored
Update workflow for OS-specific artifact handling
Refactor artifact naming and upload process for different OS.
1 parent 2dd9f45 commit 3dc357c

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

.github/workflows/python-package.yml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,17 @@ jobs:
5252
strategy:
5353
fail-fast: false
5454
matrix:
55-
os: [windows-latest, ubuntu-22.04, macos-latest, macos-15-intel]
56-
55+
include:
56+
- os: windows-latest
57+
artifact_name: MemorEasy-Windows-X64.exe
58+
- os: ubuntu-22.04
59+
artifact_name: MemorEasy-Linux-X64
60+
- os: macos-latest
61+
artifact_name: MemorEasy-macOS-ARM64
62+
- os: macos-15-intel
63+
artifact_name: MemorEasy-macOS-X64
64+
5765
runs-on: ${{ matrix.os }}
58-
5966
steps:
6067
- uses: actions/checkout@v4
6168

@@ -158,26 +165,17 @@ jobs:
158165
fi
159166
160167
pyinstaller $COMMON_ARGS $BIN_ARGS script.py
161-
162-
- name: Rename binaries for release
163-
shell: bash
164-
run: |
165-
cd dist
166-
if [[ "$RUNNER_OS" == "macOS" ]]; then
167-
mv MemorEasy MemorEasy-macOS
168-
elif [[ "$RUNNER_OS" == "Linux" ]]; then
169-
mv MemorEasy MemorEasy-Linux
170-
fi
168+
mkdir -p final_bin
169+
cp dist/MemorEasy* final_bin/${{ matrix.artifact_name }}
171170
172171
- name: Upload artifact
173172
uses: actions/upload-artifact@v4
174173
with:
175-
name: MemorEasy-${{ runner.os }}-${{ runner.arch }}
176-
path: dist/*
174+
name: ${{ matrix.artifact_name }}
175+
path: final_bin/${{ matrix.artifact_name }}
177176

178177
- name: Upload binaries to GitHub Release
179178
if: startsWith(github.ref, 'refs/tags/')
180179
uses: softprops/action-gh-release@v1
181180
with:
182-
name: MemorEasy-${{ runner.os }}-${{ runner.arch }}
183-
files: dist/*
181+
files: final_bin/*

0 commit comments

Comments
 (0)