-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (39 loc) · 1.42 KB
/
release-beta-package.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
name: Node.js Package Release Beta
on:
push:
branches:
- beta
jobs:
build-publish-beta-pkg:
name: Build and push beta package on node 22
runs-on: 'ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@v4
- id: check
uses: EndBug/version-check@v2
with:
diff-search: true
- name: Enable corepack
if: steps.check.outputs.changed == 'true' && contains(steps.check.outputs.version, 'beta')
run: corepack enable
- name: Setup Node
if: steps.check.outputs.changed == 'true' && contains(steps.check.outputs.version, 'beta')
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
- name: Install dependencies
if: steps.check.outputs.changed == 'true' && contains(steps.check.outputs.version, 'beta')
run: yarn install --immutable
- name: Run Yarn Build
if: steps.check.outputs.changed == 'true' && contains(steps.check.outputs.version, 'beta')
run: yarn lib:build
- name: Publish beta package to npmjs
if: steps.check.outputs.changed == 'true' && contains(steps.check.outputs.version, 'beta')
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
run: |
npm config set //registry.npmjs.org/:_authToken $NODE_AUTH_TOKEN
npm publish --tag beta