-
Notifications
You must be signed in to change notification settings - Fork 33
70 lines (64 loc) · 2.76 KB
/
build_assets.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
name: Build self-contained executables for multiple platforms
on:
release:
types: [published]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-24.04
TARGET: ubuntu-24.04
CMD_BUILD: >
pyinstaller --noconfirm build-executables/dc-build-ubuntu.spec && cd dist && tar -czf ../decode-config-ubuntu-24.04.tar.gz decode-config
OUT_FILE_NAME: decode-config-ubuntu-24.04.tar.gz
ASSET_MIME: application/x-gzip
- os: ubuntu-22.04
TARGET: ubuntu-22.04
CMD_BUILD: >
pyinstaller --noconfirm build-executables/dc-build-ubuntu.spec && cd dist && tar -czf ../decode-config-ubuntu-22.04.tar.gz decode-config
OUT_FILE_NAME: decode-config-ubuntu-22.04.tar.gz
ASSET_MIME: application/x-gzip
- os: ubuntu-20.04
TARGET: ubuntu-20.04
CMD_BUILD: >
pyinstaller --noconfirm build-executables/dc-build-ubuntu.spec && cd dist && tar -czf ../decode-config-ubuntu-20.04.tar.gz decode-config
OUT_FILE_NAME: decode-config-ubuntu-20.04.tar.gz
ASSET_MIME: application/x-gzip
- os: macos-13
TARGET: macos-13
CMD_BUILD: >
pyinstaller --noconfirm build-executables/dc-build-macos.spec && cd dist && zip -r9 ../decode-config-macos-13.zip decode-config
OUT_FILE_NAME: decode-config-macos-13.zip
ASSET_MIME: application/zip
- os: macos-latest
TARGET: macos-14
CMD_BUILD: >
pyinstaller --noconfirm build-executables/dc-build-macos.spec && cd dist && zip -r9 ../decode-config-macos-14.zip decode-config
OUT_FILE_NAME: decode-config-macos-14.zip
ASSET_MIME: application/zip
- os: windows-latest
TARGET: windows
CMD_BUILD: pyinstaller --noconfirm build-executables/dc-build-windows.spec && copy dist/decode-config.exe .
OUT_FILE_NAME: decode-config.exe
ASSET_MIME: application/vnd.microsoft.portable-executable
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
# Install pip and pyinstaller
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build wheel
pip install -r requirements.txt
pip install pyinstaller
- name: Build self-contained executable with pyinstaller for ${{matrix.TARGET}}
run: ${{matrix.CMD_BUILD}}
- name: Upload asset for ${{matrix.TARGET}}
uses: softprops/action-gh-release@v2
with:
files: ${{matrix.OUT_FILE_NAME}}