#46 improve esc camera jump in chromium #109
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: Build and deploy | |
on: | |
push: | |
branches-ignore: | |
- dist | |
paths: | |
- 'package.json' | |
pull_request: | |
branches-ignore: | |
- dist | |
paths: | |
- 'package.json' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 17 | |
- name: Install dependencies | |
run: npm install --production | |
- name: Build | |
run: npm run-script build | |
- name: Commit artifacts | |
if: github.ref == 'refs/heads/master' | |
run: | | |
export APPVERSION=$(echo "console.log(require('./package.json').version)" | node) | |
mv dist /tmp/app-dist | |
git tag -f "v$APPVERSION" | |
git push -f --tags | |
git clean -f | |
rm -rf ./node_modules | |
git fetch | |
git checkout dist | |
mv /tmp/app-dist/* ./ | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add . | |
git diff-index --quiet HEAD || git commit -m "v$APPVERSION" | |
git push | |
- name: Update commit reference | |
if: github.ref == 'refs/heads/master' | |
run: | | |
echo "::add-mask::${{ secrets.UPDATE_KEY }}" | |
curl -X POST -d "key=${{ secrets.UPDATE_KEY }}" https://l3p3.de/svr/minicraft/update.txt |