-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (59 loc) · 1.93 KB
/
python-app.yml
File metadata and controls
65 lines (59 loc) · 1.93 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
# 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" ]
tags: [ "release-*" ]
pull_request:
branches: [ "main" ]
permissions:
contents: write
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pdm
pdm install
- name: Build exe
run: |
$env:PATH = "C:\msys64\usr\bin;$env:PATH"
pdm build_exe --assume-yes-for-downloads
- name: Add build data
run: git show --no-patch > Convert2EBRL.dist/build-data.txt
- name: add-release-hash
if: github.ref_type == 'tag'
run: pdm 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@v7
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@v2
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