forked from AdaptiveConsulting/ui-kit-2022
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (34 loc) · 1011 Bytes
/
publish-components.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
name: Publish @ui-kit-2022/components to npmjs
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Setup Node
working-directory: packages/ui-kit-components
uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
always-auth: true
scope: '@ui-kit-2022'
cache: npm
- name: Install
run: yarn
- name: Build
run: yarn build-lib
- name: Publish
working-directory: packages/ui-kit-components
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
echo "@ui-kit-2022:registry=https://registry.npmjs.org" >> ~/.npmrc
echo 'always-auth=true' >> ~/.npmrc
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}