Skip to content

chore: test ci :trol: #18

chore: test ci :trol:

chore: test ci :trol: #18

Workflow file for this run

name: wasm-pack
on:
push:
branches:
- "main"
jobs:
check_changes:
runs-on: ubuntu-latest
outputs:
continue: ${{ steps.check_src.outputs.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_src
run: >
if git diff HEAD~1 --quiet ./src; then
echo "continue=false" >> "$GITHUB_OUTPUT"
else
echo "continue=true" >> "$GITHUB_OUTPUT"
fi
goof:
runs-on: ubuntu-latest
needs: [check_changes]
steps:
- name: a
run: echo ${{ needs.check_changes.outputs }}
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.