-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.37 KB
/
main.yml
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
name: Compile the project
on:
workflow_dispatch:
inputs:
version:
description: 'File version (Without spaces and brackets) (Eg: 1.1.0.0, 1.1.0.0-pre)'
required: true
tagname:
description: 'TagName release (Without spaces and brackets) (Eg: 1.1.0.0-test)'
required: true
release_name:
description: 'Release name'
required: true
jobs:
Windows:
runs-on: windows-latest
steps:
- name: 'Checkout Repo'
uses: actions/checkout@v4
- name: 'Install Python'
uses: actions/setup-python@v5
with:
python-version: '3.8.10'
- name: Compile (based on Python x64)
run: |
pip install -r requirements.txt
pip install pyinstaller
pyinstaller --uac-admin --onefile --clean --noconsole --optimize 1 main.py
Move-Item -Path .\dist\main.exe -Destination ".\SRR_v${{ github.event.inputs.version }}_win64.exe"
- name: Release
if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v2
with:
files: |
SRR_v${{ github.event.inputs.version }}_win64.exe
name: v${{ github.event.inputs.release_name }}
tag_name: v${{ github.event.inputs.tagname }}
draft: false
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.PAT }}