-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.26 KB
/
Copy pathpython-app.yml
File metadata and controls
51 lines (42 loc) · 1.26 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
name: Python application (Windows Build)
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: write
jobs:
build:
runs-on: windows-latest
env:
APP_NAME: "fast-mic-toggle"
PYTHON_VERSION: "3.14"
ICON_PATH: "app/src/icon.ico"
RELEASE_NAME: "Release v0.0.0"
DEPENDENCIES: "pyaudiodevice"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
- name: Build
run: |
pyinstaller app/main.py --onefile --name "${{ env.APP_NAME }}" --icon "${{ env.ICON_PATH }}" --collect-all "${{ env.DEPENDENCIES }}"
- name: Release
uses: softprops/action-gh-release@v2
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
with:
tag_name: v0.0.0
name: ${{ env.RELEASE_NAME }}
draft: true
files: dist/${{ env.APP_NAME }}.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}