Skip to content

chore: test ci :trol: #7

chore: test ci :trol:

chore: test ci :trol: #7

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
# Only continue to build if we actually changed anything in ./src
- name: check-changes
run: |
if git diff --quiet ./src; then
echo 'continue=true' >> $GITHUB_OUTPUT
else
echo 'continue=false' >> $GITHUB_OUTPUT
fi
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.