-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.03 KB
/
wasm-build.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
name: WASM Build
on:
push:
branches:
- '*'
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Build Dependencies
run: |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build
run: |
git config user.name "$(git --no-pager log --format=format:'%an' -n 1)"
git config user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
export CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD`
export DEPLOY_BRANCH=${CURRENT_BRANCH}-deploy
git switch -c $DEPLOY_BRANCH
git pull origin $CURRENT_BRANCH
git rm ./view/.gitignore
cd graphics
make build
cd ..
rm ./view/pkg/.gitignore
rm ./view/public/resources/.gitignore
git add .
git commit -m "build: $(date +'%Y/%m/%d %H:%M:%S')"
git push origin -f $DEPLOY_BRANCH
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}