Skip to content

Commit d95022a

Browse files
committed
prebuilt release flow
1 parent ff4e0fa commit d95022a

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

.github/workflows/webos.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Build (webOS)
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
pull_request:
6+
release:
7+
types: [ published ]
48

59
jobs:
610
Build:
@@ -30,4 +34,24 @@ jobs:
3034
-DCMAKE_BUILD_TYPE=Release -DWEBOS=ON
3135
3236
- name: Build (CMake)
33-
run: cmake --build build/ --config Release --verbose --parallel
37+
run: cmake --build build/ --config Release --verbose --parallel
38+
39+
- name: Package (Release Only)
40+
if: github.event_name == 'release'
41+
shell: bash
42+
run: |
43+
cmake --install build/ --prefix dist
44+
cd dist
45+
tar -czf ../SDL2-$(./bin/sdl2-config --version)-webos.tar.gz .
46+
47+
- name: Release
48+
if: github.event_name == 'release'
49+
uses: ncipollo/release-action@v1
50+
with:
51+
token: ${{ secrets.GITHUB_TOKEN }}
52+
tag: ${{ github.event.release.tag_name }}
53+
allowUpdates: true
54+
omitNameDuringUpdate: true
55+
omitBody: true
56+
omitPrereleaseDuringUpdate: true
57+
artifacts: SDL2-*-webos.tar.gz

0 commit comments

Comments
 (0)