-
-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (40 loc) · 1.05 KB
/
build.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
name: build
on:
push:
branches: [ main ]
tags: [ "*" ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: windows-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Install poetry
run: pipx install poetry
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "poetry"
- name: Install Poetry
run: python -m pip install --user poetry
- name: Install dependencies
run: poetry install --no-interaction --no-root
- name: Install UPX
uses: crazy-max/ghaction-upx@v3
with:
install-only: true
- name: Build executable
run: poetry run build
- uses: actions/upload-artifact@v3
with:
name: Guardian
path: dist/Guardian-*.exe
- uses: softprops/action-gh-release@v1
with:
files: dist/Guardian-*.exe
if: startsWith(github.ref, 'refs/tags/')