-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (72 loc) · 2.13 KB
/
main.yml
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Create Release
on:
push:
tags:
- '*'
jobs:
build:
name: Build app
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- os: ubuntu-22.04
- os: macos-latest
- os: windows-2019
steps:
- name: Install tk on ubuntu
if: ${{ matrix.config.os == 'ubuntu-22.04'}}
run: |
sudo apt-get update
sudo apt install python3-tk python3-dev python3-setuptools tcl
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10.8'
- name: Install dependencies for ${{ matrix.config.os }}
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
- name: Build with pyinstaller for ${{ matrix.config.os }}
run: |
cd scripts
pyinstaller main.py --onefile --noconsole
- name: Rename builded app
run: mv ./dist ./dist-${{ matrix.config.os }}
- name: Upload result job ${{ matrix.config.os }}
uses: actions/upload-artifact@v3
with:
name: PyHolofotes-pyinstaller-artifact
path: ./dist*
release:
name: Release
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: PyHolofotes-pyinstaller-artifact
- name: Zip file windows
run: zip -r PyHolofotes_windows.zip dist-windows-*
- name: Zip file ubuntu
run: zip -r PyHolofotes_ubuntu.zip dist-ubuntu-*
- name: Zip file macos
run: zip -r PyHolofotes_macos.zip dist-macos-*
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
tag_name: ${{ github.ref }}
draft: false
prerelease: false
files: |
PyHolofotes_windows.zip
PyHolofotes_ubuntu.zip
PyHolofotes_macos.zip