-
Notifications
You must be signed in to change notification settings - Fork 10
46 lines (37 loc) · 1.07 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
name: Build binaries and Upload to Release
on:
push:
branches: [main]
paths:
- "version"
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:
python-version: ${{matrix.python-version}}
- name: Build
run: |
poetry add pyinstaller
poetry run pyinstaller -F -n ToolDelta-$(<version)-${{ matrix.os == 'windows-latest' && 'windows.exe' || 'linux' }} -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/*