-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (63 loc) · 2.24 KB
/
release.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
name: 'Build'
on:
push:
jobs:
build:
name: Build Executables
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
include:
- os: windows-latest
BUILD_CMD: pyinstaller collectmeteranalog.spec
POST_BUILD_CMD: >+
Compress-Archive -Path dist/* -Destination dist/collectmeteranalog-windows.zip
OUT_FILE_NAME: collectmeteranalog-windows.zip
ASSET_MIME:
application/zip
- os: ubuntu-latest
BUILD_CMD: pyinstaller collectmeteranalog.spec
POST_BUILD_CMD: >
cd dist/ &&
ls -Rls &&
zip -r9 collectmeteranalog-linux.zip collectmeteranalog
OUT_FILE_NAME: collectmeteranalog-linux.zip
ASSET_MIME: application/zip
- os: macos-latest
BUILD_CMD: pyinstaller collectmeteranalog.spec
POST_BUILD_CMD: >
cd dist/ &&
ls -Rls &&
zip -r9 collectmeteranalog-macos.zip collectmeteranalog
OUT_FILE_NAME: collectmeteranalog-macos.zip
ASSET_MIME: application/zip
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.9.12'
- name: Install dependencies for ${{ matrix.os }}
run: |
python -m pip install --upgrade pip wheel setuptools
pip install -r requirements.txt
pip install pyinstaller
- name: Pre-Build for ${{ matrix.os }}
if: ${{ matrix.PRE_BUILD_CMD != '' }}
run: ${{ matrix.PRE_BUILD_CMD }}
- name: Build with pyinstaller for ${{ matrix.os }}
run: ${{ matrix.BUILD_CMD }}
- name: Post-Build for ${{ matrix.os }}
if: ${{ matrix.POST_BUILD_CMD != '' }}
run: ${{ matrix.POST_BUILD_CMD }}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: './dist/${{matrix.OUT_FILE_NAME}}'
- name: Upload created build on action
uses: actions/upload-artifact@v3
with:
path: './dist/${{matrix.OUT_FILE_NAME}}'
name: '${{runner.os}}-${{matrix.OUT_FILE_NAME}}'