Skip to content

v0.1.3

v0.1.3 #17

Workflow file for this run

name: Server - Release
on:
release:
types: [ published ]
env:
node_version: 14
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.node_version }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.node_version }}
# setting a registry enables the NODE_AUTH_TOKEN env variable where we can set an npm token. REQUIRED
registry-url: "https://registry.npmjs.org"
- uses: jetli/wasm-pack-action@v0.4.0
with:
version: 'latest'
- uses: jetli/wasm-bindgen-action@v0.2.0
with:
version: 'latest'
- name: Set Release Version from Tag
run: echo "RELEASE_VERSION=$(echo ${{github.ref_name}} | sed s/v//g)" >> $GITHUB_ENV
- name: Publish Server
# see https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions
run: |
./scripts/publish-server.sh ${{ env.RELEASE_VERSION }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish Client
# rustup target add wasm32-unknown-unknown # automatically done by wasm-pack
run: |
./scripts/publish-client.sh ${{ env.RELEASE_VERSION }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}