key event #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
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 }} | |