Skip to content

Commit 798c6e0

Browse files
authored
feat: add support binaries for Mac OS
1 parent b43b866 commit 798c6e0

1 file changed

Lines changed: 14 additions & 27 deletions

File tree

.github/workflows/python-app.yml

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
name: Python application
2-
32
on:
43
push:
54
branches: [ master ]
65
pull_request:
76
branches: [ master ]
8-
97
permissions:
108
contents: write
11-
129
jobs:
1310
build:
14-
runs-on: ubuntu-latest
15-
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest, windows-latest, macos-latest]
14+
runs-on: ${{ matrix.os }}
1615
steps:
1716
- uses: actions/checkout@v3
1817
- name: Set up Python 3.10
@@ -22,46 +21,34 @@ jobs:
2221
- name: Install dependencies
2322
run: |
2423
python -m pip install --upgrade pip
25-
pip install flake8 pytest
24+
pip install flake8 pytest pyinstaller
2625
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
2726
- name: Lint with flake8
2827
run: |
2928
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
3029
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
31-
- name: Package Application Linux
32-
uses: JackMcKew/pyinstaller-action-linux@main
33-
with:
34-
path: src
35-
36-
- uses: actions/upload-artifact@v2
37-
with:
38-
name: docker-dev-lamp-linux
39-
path: src/dist/linux
40-
41-
- name: Package Application Windows
42-
uses: JackMcKew/pyinstaller-action-windows@main
43-
with:
44-
path: src
45-
30+
- name: Package Application
31+
run: |
32+
cd src
33+
pyinstaller --onefile --name docker-dev-lamp main.py
4634
- uses: actions/upload-artifact@v2
4735
with:
48-
name: docker-dev-lamp-windows
49-
path: src/dist/windows
50-
36+
name: docker-dev-lamp-${{ runner.os }}
37+
path: src/dist/*
5138
- name: Create Tag
39+
if: matrix.os == 'ubuntu-latest'
5240
id: create_tag
5341
run: |
5442
VERSION=$(date +"%Y%m%d%H%M%S")
5543
echo "VERSION=$VERSION" >> $GITHUB_ENV
5644
git tag $VERSION
5745
git push origin $VERSION
58-
5946
- name: Create GitHub Release
47+
if: matrix.os == 'ubuntu-latest'
6048
uses: softprops/action-gh-release@v1
6149
with:
6250
files: |
63-
src/dist/linux/**/*
64-
src/dist/windows/**/*
51+
src/dist/*
6552
tag_name: ${{ env.VERSION }}
6653
name: Release ${{ env.VERSION }}
6754
env:

0 commit comments

Comments
 (0)