Create main.yml

This commit is contained in:
Naiel
2025-08-15 16:43:18 +02:00
committed by GitHub
parent 2f1b036c3f
commit e29c02ebe5

42
.github/workflows/main.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: Build and publish
on:
push:
branches:
- main
tags:
- "v*.*.*"
jobs:
build-windows:
permissions:
contents: write
name: Build EXE
runs-on: windows-latest
steps:
- name: Create Executable
uses: sayyid5416/pyinstaller@v1
with:
python_ver: "3.11"
spec: "main.py"
requirements: "requirements.txt"
upload_exe_with_name: "TeleSec_Windows"
release:
needs:
- build-windows
name: Release via GHA
runs-on: ubuntu-latest
if: startsWith(github.ref_name, 'v')
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
name: TeleSec_Windows
- uses: ncipollo/release-action@v1
with:
artifacts: "G-Serv.exe"
prerelease: true
allowUpdates: true
omitBodyDuringUpdate: true
omitPrereleaseDuringUpdate: true