Add build config for itch.io #437
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 | |
on: | |
workflow_dispatch: | |
push: | |
branches: ["main"] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
# Builds the application | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "16.17" | |
- uses: Swatinem/[email protected] | |
with: | |
workspaces: | | |
elara-lib | |
- run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- run: npm install | |
- run: npm run build | |
- run: git config user.name "GitHub Actions" | |
- run: git config user.email "()" | |
- run: git fetch origin publish | |
- run: git add ./web/dist --force | |
- run: git commit -m "(Automatic build)" | |
- run: git push origin main:publish --force-with-lease |