-
Notifications
You must be signed in to change notification settings - Fork 490
54 lines (44 loc) · 1.28 KB
/
js_rc.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
name: JS SDK Release Candidate
on:
pull_request:
permissions:
contents: write
jobs:
release:
name: Release Candidate
if: ${{ contains( github.event.pull_request.labels.*.name, 'rc') }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/js-sdk
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- uses: pnpm/action-setup@v2
- name: Setup Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- name: Configure pnpm
run: |
pnpm config set auto-install-peers true
pnpm config set exclude-links-from-lockfile true
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Release Candidate
run: |
npm version prerelease --preid=${{ github.head_ref }}
npm publish --tag rc --dry-run
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Commit new versions
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git commit -am "[skip ci] Release new versions" || exit 0
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}