-
Notifications
You must be signed in to change notification settings - Fork 4.3k
56 lines (48 loc) · 1.34 KB
/
release_js_sdk.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Release JS SDK
on:
workflow_dispatch:
inputs:
version:
description: 'Version to publish (e.g., 0.3.0 | 0.3.0-beta)'
required: true
type: string
isRCRelease:
description: 'Is this a release candidate release?'
required: true
type: boolean
jobs:
run-js-tests:
permissions:
contents: write
timeout-minutes: 60
runs-on: ubuntu-latest
defaults:
run:
working-directory: js
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm install -g pnpm
- name: Install packages in js folder
run: pnpm install --frozen-lockfile
- name: Bump version
run: ./bump_version.sh ${{ github.event.inputs.version }}
- name: Set publishing config
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: pnpm build
run: pnpm build
- name: pnpm publish
working-directory: js/dist
run: |
if ${{ github.event.inputs.isRCRelease }}; then
pnpm publish --no-git-checks --tag rc
else
pnpm publish --no-git-checks
fi