This commit is contained in:
36
.gitea/workflows/exec.yaml
Normal file
36
.gitea/workflows/exec.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Build Executable
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build-and-package:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Install PyInstaller
|
||||
run: pip install pyinstaller
|
||||
|
||||
- name: Build executable with PyInstaller
|
||||
run: pyinstaller --onefile --windowed --add-data "weather_icon.svg:." main.py
|
||||
|
||||
- name: Upload executable artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: executable
|
||||
path: dist/
|
||||
Reference in New Issue
Block a user