-
Notifications
You must be signed in to change notification settings - Fork 10
54 lines (44 loc) · 1.35 KB
/
build_and_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
name: Build binaries and Upload to Release
on:
workflow_run:
workflows: ["Sync Version"]
types:
- completed
workflow_dispatch: {}
defaults:
run:
shell: bash
jobs:
build:
name: Build and Release for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
python-version: ["3.12"]
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: "Setup Python, Poetry and Dependencies"
uses: packetcoders/action-setup-cache-python-poetry@main
with:
poetry-version: 1.7.1
python-version: ${{matrix.python-version}}
- name: Build
run: |
poetry add pyinstaller
poetry run pyinstaller -F -n ToolDelta-${{ matrix.os == 'windows-latest' && 'windows.exe' || 'linux' }} -i logo.ico main.py
- name: Build for arm64
uses: pguyot/arm-runner-action@v2
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
commands: |
poetry run pyinstaller -F -n ToolDelta-linux-arm64 -i logo.ico main.py
- name: Get Version
run: echo "VERSION=$(<version)" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.VERSION }}
name: ${{ env.VERSION }}
files: dist/*