File tree Expand file tree Collapse file tree 4 files changed +38
-6
lines changed Expand file tree Collapse file tree 4 files changed +38
-6
lines changed Original file line number Diff line number Diff line change 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 }}
Original file line number Diff line number Diff line change 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
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
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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
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
You can’t perform that action at this time.
0 commit comments