-
Notifications
You must be signed in to change notification settings - Fork 5
40 lines (34 loc) · 1.1 KB
/
publish-npm-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
name: Publish Package to npm
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
environment: npm
steps:
- name: Checkout 🛎️
uses: actions/[email protected]
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v2
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- name: Install 👾
run: yarn
- name: Build core 📦
if: ${{ contains(github.ref, 'juno-core') }}
run: yarn workspace @ringcentral/juno run release
- name: Publish core 🚀
if: ${{ contains(github.ref, 'juno-core') }}
run: npm publish ./packages/juno-core/dist
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Build icon 📦
if: ${{ contains(github.ref, 'juno-icon') }}
run: yarn workspace @ringcentral/juno-icon run release
- name: Publish icon 🚀
if: ${{ contains(github.ref, 'juno-icon') }}
run: npm publish ./packages/juno-icon/dist
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}