-
Notifications
You must be signed in to change notification settings - Fork 29
76 lines (73 loc) · 2.17 KB
/
build-multiplatform.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
name: Build multiplatform
on:
workflow_dispatch:
inputs:
tag:
description: Release git tag
type: string
required: true
push:
pull_request:
permissions:
contents: write
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- name: Windows
os: windows-latest
artifactsPath: ./src/dist/*.exe
- name: Linux
os: ubuntu-20.04
artifactsPath: ./src/dist/*.AppImage
- name: MacOS Intel
os: macos-13
artifactsPath: ./src/dist/*.zip
- name: MacOS Silicon
os: macos-latest
artifactsPath: ./src/dist/*.zip
- name: Windows_dir
os: windows-latest
artifactsPath: ./src/dist/*.zip
- name: Linux_dir
os: ubuntu-20.04
artifactsPath: ./src/dist/*.zip
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: "3.12.0"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests patool screeninfo packaging wmi GPUtil colorlog psutil pyperclip pyinstaller https://github.com/MaxLastBreath/ttkbootstrapFIX/zipball/master
- name: Build ${{ matrix.name }}
run: |
cd ./src/
python ./compile_onedir.py
if: ${{ endsWith(matrix.name, 'dir') || startsWith(matrix.name, 'MacOS') }}
- name: Build ${{ matrix.name }}
run: |
cd ./src/
python ./compile.py
if: ${{ !endsWith(matrix.name, 'dir') && !startsWith(matrix.name, 'MacOS') }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts-${{ matrix.name }}
path: ./src/dist
- name: Publish release
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: ncipollo/release-action@v1
with:
artifacts: ${{ matrix.artifactsPath }}
tag: ${{ inputs.tag }}
name: TOTK Optimizer ${{ inputs.tag }}
allowUpdates: true
artifactErrorsFailBuild: false
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}