-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.07 KB
/
build.yml
File metadata and controls
50 lines (41 loc) · 1.07 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
name: Build Windows EXE
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Read version from pyproject.toml
id: get_version
shell: bash
run: |
VERSION=$(grep -E '^version =' pyproject.toml | sed -E 's/version = "(.*)"/\1/')
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "version=$VERSION"
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install pyinstaller
if (Test-Path "requirements.txt") {
pip install -r requirements.txt
}
- name: Build EXE
run: |
pyinstaller --noconsole --onefile main.py
mv dist/main.exe "dist/WebODM_client-v${{ env.VERSION }}.exe"
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: dist/*.exe
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}