-
Notifications
You must be signed in to change notification settings - Fork 5
107 lines (95 loc) · 2.68 KB
/
build.yml
File metadata and controls
107 lines (95 loc) · 2.68 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Build
on:
push:
tags:
- "*"
jobs:
build-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m pip install pyinstaller
- name: Build for Linux
run: |
pyi-makespec src/main.py --onefile --noconsole
pyinstaller --clean main.spec
ls dist
- name: bottom text
uses: actions/upload-artifact@v3
with:
name: river-linux
path: dist/main
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m pip install pyinstaller
- name: Build for Windows
run: |
pyi-makespec src\main.py --onefile --noconsole
pyinstaller --clean main.spec
- name: Save artifact
uses: actions/upload-artifact@v3
with:
name: river-windows
path: dist/main.exe
release:
runs-on: ubuntu-latest
needs: [build-windows, build-linux]
permissions: write-all
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: river-windows
path: dist
- uses: actions/download-artifact@v3
with:
name: river-linux
path: dist
- name: Create release
id: release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: Alpha ${{ github.ref_name }}
draft: false
prerelease: false
- name: Upload WIN
id: upload-release-asset
uses: sekwah41/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_path: 'dist/main.exe'
asset_name: "catalyst5.exe"
asset_content_type: application/zip
upload_url: ${{ steps.release.outputs.upload_url }}
- name: Upload NIX
id: upload-release-asset2
uses: sekwah41/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_path: 'dist/main'
asset_name: "catalyst5"
asset_content_type: application/zip
upload_url: ${{ steps.release.outputs.upload_url }}