Switch to GH actions #1
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-master | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build app | |
run: | | |
docker run --rm -it -v "$(pwd)":/home/rust/src wafflespeanut/rust-wasm-builder:nightly wasm-pack build | |
docker run --rm -it -v "$(pwd)":/home/rust/src wafflespeanut/rust-wasm-builder:nightly sh -c "mv pkg/charcoal_bg.wasm target/charcoal_old.wasm && wasm-opt -O3 -o pkg/charcoal_bg.wasm target/charcoal_old.wasm" | |
docker run --rm -it -v "$(pwd)":/home/node/app node sh -c "cd /home/node/app/pkg && npm link && cd .. && npm link rusty-sketch && npm install && npm run build" | |
docker build -t wafflespeanut/rusty-sketch . | |
- name: Push to registry | |
run: | | |
docker login -u="${{ secrets.DOCKER_USERNAME }}" -p="${{ secrets.DOCKER_PASSWORD }}" | |
docker push wafflespeanut/rusty-sketch |