-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.31 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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 }}