Skip to content

chore: test ci :trol: #12

chore: test ci :trol:

chore: test ci :trol: #12

Workflow file for this run

name: wasm-pack
on:
push:
branches:
- "main"
jobs:
check-changes:
runs-on: ubuntu-latest
outputs:
continue: ${{ steps.check-changes.continue }}
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
# Only continue to build if we actually changed anything in ./src
- name: check-changes
run: >
if git diff HEAD~1 --quiet ./src; then
echo 'continue=false' >> $GITHUB_OUTPUT
else
echo 'continue=true' >> $GITHUB_OUTPUT
fi
echo $GITHUB_OUTPUT
build:
runs-on: ubuntu-latest
needs: [check-changes]
if: needs.check-changes.outputs.continue == 'true'
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- name: checkout
uses: actions/checkout@v4
- name: install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- run: wasm-pack build
# Remove the auto-generated gitignore file.
- run: rm ./pkg/.gitignore
- name: commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Build wasm.