-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (60 loc) · 2.06 KB
/
python-app.yml
File metadata and controls
66 lines (60 loc) · 2.06 KB
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python application
on:
push:
branches: [ "main", "release" ]
tags: [ "release-*" ]
pull_request:
branches: [ "main" ]
permissions:
contents: write
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: "gui/.python-version"
- name: Install UV
uses: astral-sh/setup-uv@v7
with:
version: "0.11.3"
- name: Install the project
run: uv sync --all-packages --frozen --all-extras --dev
- name: Build exe
run: |
$env:PATH = "C:\msys64\usr\bin;$env:PATH"
uv run --package=convert2ebrl python -m nuitka --assume-yes-for-downloads "gui\Convert2EBRL.pyw"
- name: Add build data
run: git show --no-patch > Convert2EBRL.dist/build-data.txt
- name: add-release-hash
if: github.ref_type == 'tag'
run: uv run python -m "convert2ebrl.hash_utils" "Convert2EBRL.dist\Convert2EBRL.exe" "Convert2EBRL.dist\build-data.txt" > "Convert2EBRL.dist\release.hash"
- name: Create release zip
run: Compress-Archive -Path Convert2EBRL.dist -Destination convert2ebrl-continuous.zip
- name: Update continuous tag
uses: actions/github-script@v9
with:
script: |
github.rest.git.updateRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'tags/continuous',
sha: context.sha
})
- name: Update continuous release
uses: softprops/action-gh-release@v3
with:
name: continuous
tag_name: continuous
files: convert2ebrl-continuous.zip
prerelease: true
draft: false
- name: Upload binary artifact
uses: actions/upload-artifact@v4
with:
name: convert2ebrl-dist
path: Convert2EBRL.dist