-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (69 loc) · 1.94 KB
/
release.yaml
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
73
74
75
76
77
78
79
name: Release
on:
push:
branches: ["main"]
tags:
- 'v*'
jobs:
build-windows:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- name: Git Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
update: true
install: >-
mingw-w64-x86_64-gtk4
mingw-w64-x86_64-python3-gobject
mingw-w64-x86_64-gobject-introspection
mingw-w64-x86_64-python
mingw-w64-x86_64-python-pip
mingw-w64-x86_64-python-poetry
mingw-w64-x86_64-pkg-config
- name: List
run: |
pacman -Ql mingw-w64-x86_64-python
echo "------------------------------------"
pacman -Ql mingw-w64-x86_64-python-poetry
- name: Install Poetry and Deps
run: |
/mingw64/bin/python3.exe --version
/mingw64/bin/pip.exe install poetry
/mingw64/bin/poetry.exe --version
/mingw64/bin/poetry.exe install --with dev
- name: Run Pyinstaller
run: |
poetry run pyinstaller --clean --onefile -w --add-data "data/style.css:./data" --exclude-module=pytest keyboard.py
mv ./dist/keyboard
- name: Store Dist
uses: actions/upload-artifact@v4
with:
name: windows-dist
path: dist/
github-release:
needs: [ build-windows ]
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Download Linux Artifacts
uses: actions/download-artifact@v4
with:
name: windows-dist
path: dist/
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create "${{ github.ref_name }}" dist/**
--repo "${{ github.repository }}"
--generate-notes