-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (61 loc) · 1.95 KB
/
release.yml
File metadata and controls
74 lines (61 loc) · 1.95 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Build and Release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: windows-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Build EXE
shell: cmd
run: |
pyinstaller ^
--clean ^
--onefile ^
--noconsole ^
--name="ShScriptHub-${{ github.ref_name }}" ^
--icon=%GITHUB_WORKSPACE%\assets\icon.ico ^
--add-data "%GITHUB_WORKSPACE%\assets;assets" ^
--distpath release ^
--workpath build ^
--specpath release ^
src/main.py
- name: Prepare package
run: |
mkdir package
copy release\ShScriptHub-*.exe package\
copy README.md package\
- name: Create ZIP
run: |
powershell Compress-Archive -Path package\* -DestinationPath ShScriptHub-${{ github.ref_name }}.zip
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: ShScriptHub - ${{ github.ref_name }}
body: |
### This release includes:
- `ShScriptHub-${{ github.ref_name }}` - Main executable
- `ShScriptHub-${{ github.ref_name }}` - All-in-one package (exe, readme)
## Changelog
### ${{ github.ref_name }}
---
**How to use:**
1. Download and extract the .zip, or use the .exe directly.
2. The config file is auto-generated on first run.
3. Select Bash executable path.
4. Select project path.
5. Done!
files: |
release/ShScriptHub-${{ github.ref_name }}.exe
ShScriptHub-${{ github.ref_name }}.zip