-
Notifications
You must be signed in to change notification settings - Fork 13
66 lines (55 loc) · 1.64 KB
/
emscripten.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
name: Emscripten
on:
push:
branches: [main, ci]
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
all_but_latest: true
- name: Checkout Base Repo
uses: actions/checkout@v2
- name: Checkout Submodules
run: |
git submodule sync
git submodule update --init --recursive --force
- name: Build Docker Image
run: |
docker build -t libass/jso .
- name: Build Binaries
run: |
docker run --rm -v "${PWD}":/code libass/jso:latest
- name: Upload Nightly Build
uses: actions/upload-artifact@v2
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
with:
name: js
path: dist
update_gh-pages:
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: gh-pages
- name: Download nightly build
uses: actions/download-artifact@v3
with:
name: js
path: jassub/assets
- name: Push new version
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git add jassub/assets
git commit -m "$(printf \
"Update binaries to latest nightly\n\nFrom %s" "${{ github.sha }}")"
git push origin gh-pages