This repository has been archived by the owner on Jul 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
160 lines (127 loc) · 3.8 KB
/
nightly-release.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
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
name: Nightly App Release
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build_linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@master
with: { python-version: '3.10' }
- name: Upgrade pip
run: python -m pip install --upgrade pip pipenv
- name: Install library
run: pipenv sync
- name: Build
run: pipenv run pyinstaller ./src/main.py -F
- name: Upload
uses: actions/upload-artifact@v1
with:
name: release-linux
path: dist/main
build_macintosh:
runs-on: macOS-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@master
with: { python-version: '3.10' }
- name: Upgrade pip
run: python -m pip install --upgrade pip pipenv
- name: Install library
run: pipenv sync
- name: Install additional library
run: pipenv install macholib
- name: Build
run: pipenv run pyinstaller ./src/main.py -F
- name: Upload
uses: actions/upload-artifact@v1
with:
name: release-mac
path: dist/main
build_windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@master
with: { python-version: '3.10' }
- name: Upgrade pip
run: python -m pip install --upgrade pip pipenv
- name: Install library
run: pipenv sync
- name: Install additional library
run: pipenv install pywin32-ctypes
- name: Build
run: pipenv run pyinstaller ./src/main.py -F
- name: Upload
uses: actions/upload-artifact@v1
with:
name: release-win
path: dist/main.exe
release:
needs: [build_linux, build_macintosh, build_windows]
runs-on: ubuntu-latest
steps:
- name: Download Linux
uses: actions/download-artifact@v1
with:
name: release-linux
- name: Download Mac
uses: actions/download-artifact@v1
with:
name: release-mac
- name: Download Windows
uses: actions/download-artifact@v1
with:
name: release-win
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: '@${{ github.sha }}'
release_name: VSML@${{ github.sha }}
body: VSML nightly @${{ github.sha }}
draft: false
prerelease: false
- name: Zip
run: |
tar -C release-linux -pczvf release-linux.tar.gz main
tar -C release-mac -pczvf release-mac.tar.gz main
zip --junk-paths release-win ./release-win/main.exe
- name: Append linux binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release-linux.tar.gz
asset_name: release-linux.tar.gz
asset_content_type: application/gzip
- name: Append macintosh binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release-mac.tar.gz
asset_name: release-mac.tar.gz
asset_content_type: application/gzip
- name: Append windows binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release-win.zip
asset_name: release-win.zip
asset_content_type: application/zip