Adding script to pipeline to automatically bump version #8
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: [main] | |
tags: ["v*"] | |
pull_request: | |
branches: ["*"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: | |
- 16.x | |
- 18.x | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
lfs: true | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: https://registry.npmjs.org | |
- run: yarn install --immutable | |
- run: yarn run build:ts | |
- run: yarn run lint:ci | |
- name: Restore emscripten build cache | |
uses: actions/[email protected] | |
with: | |
path: | | |
.emscripten_cache | |
key: 1-emscripten-${{ hashFiles('build.sh') }} | |
restore-keys: | | |
1-emscripten- | |
- run: yarn run build:wasm | |
# Catch Node import failures that don't reproduce in Jest <https://github.com/foxglove/wasm-bz2/issues/4> | |
- run: node -e 'require("./dist/index.js").default.init()' | |
- run: yarn run test | |
- name: Publish to NPM | |
if: ${{ startsWith(github.ref, 'refs/tags/v') && matrix.node-version == '16.x' }} | |
run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} |