@@ -2,17 +2,32 @@ name: CI
2
2
3
3
on :
4
4
push :
5
- paths-ignore :
5
+ paths-ignore :
6
6
- ' *.md'
7
7
- ' *.yml'
8
8
pull_request :
9
- paths-ignore :
9
+ paths-ignore :
10
10
- ' *.md'
11
11
- ' *.yml'
12
12
13
13
jobs :
14
+ Init :
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ - name : Create build tag
18
+ run : |
19
+ export BUILD_TAG=build-$(date -u +'%Y%m%d%H%M')
20
+ echo "BUILD_TAG=$BUILD_TAG" >> $GITHUB_ENV
21
+ echo -n $BUILD_TAG > tag
22
+ - name : Upload artifacts
23
+ uses : actions/upload-artifact@v2
24
+ with :
25
+ name : tag
26
+ path : tag
27
+
14
28
build-windows :
15
29
runs-on : windows-latest
30
+ needs : Init
16
31
env :
17
32
POWERSHELL_TELEMETRY_OPTOUT : 1
18
33
strategy :
47
62
48
63
build-linux :
49
64
runs-on : ubuntu-latest
65
+ needs : Init
50
66
steps :
51
67
- uses : actions/checkout@v2
52
68
- name : CMake generate
67
83
68
84
build-macos :
69
85
runs-on : macos-latest
86
+ needs : Init
70
87
steps :
71
88
- uses : actions/checkout@v2
72
89
- name : CMake generate
@@ -84,3 +101,101 @@ jobs:
84
101
with :
85
102
name : extract-xiso_${{ runner.os }}
86
103
path : artifacts
104
+
105
+ Release :
106
+ if : github.event_name == 'push' && github.ref == 'refs/heads/master'
107
+ runs-on : ubuntu-latest
108
+ needs : [build-windows, build-linux, build-macos]
109
+ env :
110
+ BUILD_TAG :
111
+ steps :
112
+ - name : Download artifacts
113
+ uses : actions/download-artifact@v2
114
+ with :
115
+ path : dist
116
+ - name : Create archives
117
+ run : |
118
+ pushd dist/extract-xiso_Win32_Release
119
+ zip -r ../extract-xiso-win32-release.zip *
120
+ popd
121
+ pushd dist/extract-xiso_Win32_Debug
122
+ zip -r ../extract-xiso-win32-debug.zip *
123
+ popd
124
+ ###
125
+ # Comment out Win64 builds as they are currently broken
126
+ ###
127
+ # pushd dist/extract-xiso_Win64_Release
128
+ # zip -r ../extract-xiso-win64-release.zip *
129
+ # popd
130
+ # pushd dist/extract-xiso_Win64_Debug
131
+ # zip -r ../extract-xiso-win64-debug.zip *
132
+ # popd
133
+ pushd dist/extract-xiso_macOS
134
+ zip -r ../extract-xiso-macos.zip *
135
+ popd
136
+ - name : Get package info
137
+ run : |
138
+ echo "BUILD_TAG=$(cat dist/tag/tag)" >> $GITHUB_ENV
139
+ - name : Create release
140
+ id : create_release
141
+ uses : actions/create-release@v1
142
+ env :
143
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
144
+ with :
145
+ tag_name : ${{ env.BUILD_TAG }}
146
+ release_name : ${{ env.BUILD_TAG }}
147
+ draft : false
148
+ prerelease : false
149
+ - name : Upload release assets (Win32 build)
150
+ id : upload-release-assets-win32-release
151
+
152
+ env :
153
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
154
+ with :
155
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
156
+ asset_name : extract-xiso-win32-release.zip
157
+ asset_path : dist/extract-xiso-win32-release.zip
158
+ asset_content_type : application/zip
159
+ - name : Upload release assets (Win32 debug build)
160
+ id : upload-release-assets-win32-debug
161
+
162
+ env :
163
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
164
+ with :
165
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
166
+ asset_name : extract-xiso-win32-debug.zip
167
+ asset_path : dist/extract-xiso-win32-debug.zip
168
+ asset_content_type : application/zip
169
+ # ##
170
+ # Comment out Win64 builds as they are currently broken
171
+ # ##
172
+ # - name: Upload release assets (Win64 build)
173
+ # id: upload-release-assets-win64-release
174
+
175
+ # env:
176
+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
177
+ # with:
178
+ # upload_url: ${{ steps.create_release.outputs.upload_url }}
179
+ # asset_name: extract-xiso-win64-release.zip
180
+ # asset_path: dist/extract-xiso-win64-release.zip
181
+ # asset_content_type: application/zip
182
+ # - name: Upload release assets (Win64 debug build)
183
+ # id: upload-release-assets-win64-debug
184
+
185
+ # env:
186
+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
187
+ # with:
188
+ # upload_url: ${{ steps.create_release.outputs.upload_url }}
189
+ # asset_name: extract-xiso-win64-debug.zip
190
+ # asset_path: dist/extract-xiso-win64-debug.zip
191
+ # asset_content_type: application/zip
192
+ - name : Upload release assets (macOS build)
193
+ id : upload-release-assets-macos-release
194
+
195
+ env :
196
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
197
+ with :
198
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
199
+ asset_name : extract-xiso-macos.zip
200
+ asset_path : dist/extract-xiso-macos.zip
201
+ asset_content_type : application/zip
0 commit comments