-
-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (50 loc) · 1.41 KB
/
build.yaml
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
name: Release
on:
push:
tags:
- '*'
jobs:
Windows-release:
runs-on: windows-latest
steps:
- name: Python Setup
uses: actions/setup-python@v4
with:
python-version: "3.11"
architecture: x64
- name: Checkout Source
uses: actions/checkout@v3
- name: Install Dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Freeze editor
run: |
pyinstaller main.spec --noconfirm
- name: Zip Windows bin folder
run: |
& "C:\Program Files\7-Zip\7z.exe" a "Windows_binary.zip" "./dist/main/*"
- name: Upload binary ZIP file
uses: actions/upload-artifact@v3
with:
name: pywr_editor
path: Windows_binary.zip
- name: Create installer
run: |
& 'C:\Program Files (x86)\Inno Setup 6\ISCC.exe' windows_setup.iss
- name: Upload installer
uses: actions/upload-artifact@v3
with:
name: pywr_editor
path: Output
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
# approve release manually
draft: true
body_path: CHANGELOG.md
files: |
./Output/Pywr_editor_installer.exe
./Windows_binary.zip