forked from timreibe/vaccipy
-
Notifications
You must be signed in to change notification settings - Fork 0
145 lines (126 loc) · 4.55 KB
/
deploy.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
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
# Deploy workflow
# Builds the application for windows and ubuntu and creates distributable. Then creates a new
# Github release with the tag name and uploads the distributables to the release.
# Runs only on "v*" tags like "v1.0.0".
name: deploy
on:
push:
tags:
- v*.*.*
workflow_dispatch:
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: tagname
uses: olegtarasov/[email protected]
- name: Write version file
run: echo ${{ env.GIT_TAG_NAME }} > version.txt
- name: Setup Python
uses: actions/[email protected]
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build Windows
run: pyinstaller --clean --noconfirm specs/windows-terminservice.spec
- name: Build Windows GUI
run: pyinstaller --clean --noconfirm specs/windows-terminservice-gui.spec
- name: Chocolatey install innosetup
uses: crazy-max/[email protected]
with:
# Arguments to pass to Chocolatey
args: install innosetup --install-arguments="'/DIR=../innosetup'" --force
- name: Innosetup windows-terminservice
# Run innosetup and set application version to git tag
run: ../innosetup/ISCC.exe specs/windows-terminservice.iss /DApplicationVersion=${{ env.GIT_TAG_NAME }}
- name: Innosetup windows-terminservice-gui
# Run innosetup and set application version to git tag
run: ../innosetup/ISCC.exe specs/windows-terminservice-gui.iss /DApplicationVersion=${{ env.GIT_TAG_NAME }}
- name: Zip Windows
uses: papeloto/action-zip@v1
with:
files: dist/windows-terminservice
dest: vaccipy-windows.zip
- name: Zip Windows gui
uses: papeloto/action-zip@v1
with:
files: dist/windows-terminservice-gui
dest: vaccipy-windows-gui.zip
- name: Store windows zip as build artifact
uses: actions/upload-artifact@v2
with:
name: vaccipy-windows
path: vaccipy-windows.zip
- name: Store windows gui zip as build artifact
uses: actions/upload-artifact@v2
with:
name: vaccipy-windows-gui
path: vaccipy-windows-gui.zip
- name: Store windows installer as build artifact
uses: actions/upload-artifact@v2
with:
name: vaccipy-windows-installer
path: installers/vaccipy_installer.exe
- name: Store windows gui installer as build artifact
uses: actions/upload-artifact@v2
with:
name: vaccipy-windows-gui-installer
path: installers/vaccipy_gui_installer.exe
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: tagname
uses: olegtarasov/[email protected]
- name: Print version
run: echo ${{ env.GIT_TAG_NAME }}
- name: Write version file
run: echo ${{ env.GIT_TAG_NAME }} > version.txt
- name: Print directory
run: pwd
- name: List directory
run: ls -lah
- name: print version file
run: cat version.txt
- name: Setup Python
uses: actions/[email protected]
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build Linux
run: pyinstaller --clean --noconfirm specs/linux-64-terminservice.spec
- name: Zip
uses: papeloto/action-zip@v1
with:
files: dist/
dest: vaccipy-ubuntu.zip
- name: Store ubuntu build artifact
uses: actions/upload-artifact@v2
with:
name: vaccipy-ubuntu
path: vaccipy-ubuntu.zip
release:
runs-on: ubuntu-latest
needs: [build-windows, build-linux]
steps:
- name: Download build files
uses: actions/download-artifact@v2
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
files: |
vaccipy-windows-installer/vaccipy_installer.exe
vaccipy-windows-gui-installer/vaccipy_gui_installer.exe
vaccipy-windows/vaccipy-windows.zip
vaccipy-windows-gui/vaccipy-windows-gui.zip
vaccipy-ubuntu/vaccipy-ubuntu.zip