Repository navigation
72 lines (66 loc) · 2.41 KB
/
Copy pathpython-app.yml
File metadata and controls
72 lines (66 loc) · 2.41 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
67
68
69
70
71
72
# 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@v7
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version-file: "gui/.python-version"
- name: Install UV
uses: astral-sh/setup-uv@v7
with:
version: "0.12.11"
- 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 == 'refs/heads/release'
run: uv run python -m "convert2ebrl.hash_utils" "Convert2EBRL.dist\Convert2EBRL.exe" "Convert2EBRL.dist\build-data.txt" > "Convert2EBRL.dist\release.hash"
- name: Collect files for artifact
run: |
xcopy Convert2EBRL.dist output\Convert2EBRL\Convert2EBRL.dist /S /I
xcopy gui\icons output\Convert2EBRL\icons /S /I
copy gui\conveyor.conf output\Convert2EBRL\conveyor.conf
copy vendor\liblouis\COPYING.LESSER output\Convert2EBRL\Convert2EBRL.dist\louis\COPYING.LESSER
- name: Create release zip
run: Compress-Archive -Path output\\Convert2EBRL -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@v7
with:
name: convert2ebrl-dist
path: output