publish remote client #11
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: Server - Release | |
#on: | |
# push: | |
# tags: | |
# - "v*.*.*" | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
node_version: 14 | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ env.node_version }} | |
uses: actions/setup-node@v2 | |
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/[email protected] | |
with: | |
version: 'latest' | |
- uses: jetli/[email protected] | |
with: | |
version: 'latest' | |
# see https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions | |
- run: | | |
export VERSION=0.0.3 # ${{ github.event.release.tag_name }} | |
./scripts/publish-server.sh $VERSION | |
# rustup target add wasm32-unknown-unknown # automatically done by wasm-pack | |
./scripts/publish-client.sh $VERSION | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |