-
Notifications
You must be signed in to change notification settings - Fork 10
48 lines (46 loc) · 1.31 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
44
45
46
47
48
name: Build
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: pip install .[dev]
- name: Build
run: pyinstaller Alune.spec
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: alune-build
path: dist/Alune.exe
release:
if: ${{ github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' }}
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download build
uses: actions/download-artifact@v4
with:
name: alune-build
- name: Parse version from pyproject.toml and write to GITHUB_OUTPUT
id: parse_version
run: |
version=$(cat pyproject.toml | grep version | head -1 | awk '{ gsub("\"", "") } { print $3 }')
echo "version=$version" >> $GITHUB_OUTPUT
- uses: ncipollo/release-action@v1
with:
artifacts: "Alune.exe"
tag: v${{ steps.parse_version.outputs.version }}
draft: true