forked from Sunbird-Ed/sb-dashlets
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (33 loc) · 949 Bytes
/
publish-sb-dashlets.yml
File metadata and controls
39 lines (33 loc) · 949 Bytes
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
name: Publish sb-dashlets Package
on:
push:
tags:
- '*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18.19.0'
- name: Restore Yarn cache
id: cache
uses: actions/cache@v4
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-cache-
- name: Install dependencies
run: yarn install
- name: Build and Publish package
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm run build-lib
npm pack ./dist/sb-dashlets
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc
npm publish ./dist/sb-dashlets