Create main.yml
This commit is contained in:
42
.github/workflows/main.yml
vendored
Normal file
42
.github/workflows/main.yml
vendored
Normal 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
|
||||
Reference in New Issue
Block a user