-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (43 loc) · 1.4 KB
/
package-matrix.yml
File metadata and controls
46 lines (43 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Package — Build & Upload using Matrix
env:
PIP_DISABLE_PIP_VERSION_CHECK: "1"
on:
release:
types: [published]
jobs:
package:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.8, 3.11]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
- name: Build with PyInstaller
run: |
pyinstaller --onefile app/hello.py -n hello-${{ matrix.os }}-${{ matrix.python-version }}
- name: Upload packaged artifact
uses: actions/upload-artifact@v4
with:
name: hello-${{ matrix.os }}-${{ matrix.python-version }}
path: dist/hello-${{ matrix.os }}-${{ matrix.python-version }}*
- name: Upload artifact to GitHub Release
if: github.event_name == 'release'
uses: softprops/action-gh-release@v1
with:
files: |
dist/hello-${{ matrix.os }}-${{ matrix.python-version }}*
tag_name: ${{ github.event.release.tag_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}