Skip to content

Commit 78125d2

Browse files
committed
fix: ci, add prompt and test matrix
1 parent 285ae33 commit 78125d2

File tree

4 files changed

+38
-6
lines changed

4 files changed

+38
-6
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Package — Build & Upload (Solution)
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags: ["v*"]
7+
8+
jobs:
9+
package:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest, windows-latest, macos-latest]
14+
python-version: [3.10, 3.11]
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install -r requirements.txt
25+
pip install pyinstaller
26+
- name: Build with PyInstaller
27+
run: |
28+
pyinstaller --onefile app/hello.py -n hello-${{ matrix.os }}-${{ matrix.python-version }}
29+
- name: Upload packaged artifact
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: hello-${{ matrix.os }}-${{ matrix.python-version }}
33+
path: dist/hello-${{ matrix.os }}-${{ matrix.python-version }}

.github/workflows/package.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ jobs:
3535

3636
build-windows-x64:
3737
name: Build Windows x64
38-
needs: build-macos-arm64
3938
runs-on: windows-latest
4039
steps:
4140
- name: Check out
@@ -58,5 +57,5 @@ jobs:
5857
- name: Upload Windows artifact
5958
uses: actions/upload-artifact@v4
6059
with:
61-
name: hello-windows-x64.exe
60+
name: hello-windows-x64
6261
path: dist/hello-windows-x64.exe

solutions/package-exercise.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,6 @@ jobs:
6767
# - name: Upload Windows artifact
6868
# uses: actions/upload-artifact@v4
6969
# with:
70-
# name: hello-windows-x64.exe
71-
# path: # TODO: Specify the path to the Windows build artifact here, it is a file with .exe extension
70+
# name: hello-windows-x64
71+
# path: # TODO: Specify the path to the Windows build artifact here.
72+
# it is a file with .exe extension named by you under `dist/`, generated in Exercise 2

solutions/package.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ jobs:
3535

3636
build-windows-x64:
3737
name: Build Windows x64
38-
needs: build-macos-arm64
3938
runs-on: windows-latest
4039
steps:
4140
- name: Check out
@@ -58,5 +57,5 @@ jobs:
5857
- name: Upload Windows artifact
5958
uses: actions/upload-artifact@v4
6059
with:
61-
name: hello-windows-x64.exe
60+
name: hello-windows-x64
6261
path: dist/hello-windows-x64.exe

0 commit comments

Comments
 (0)