-
Notifications
You must be signed in to change notification settings - Fork 40
38 lines (32 loc) · 1.08 KB
/
publish-NPM.yaml
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 Package to npmjs
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node 18
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org
scope: '@openfin'
- name: Restore root node_modules from cache
id: node-cache
uses: actions/cache@v3
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm ci
- run: npm run build
working-directory: ./how-to/workspace-platform-starter
- run: NAME=@openfin/default-workspace-platform npm run prepare-package
working-directory: ./how-to/workspace-platform-starter
- run: npm publish --access restricted
working-directory: ./how-to/workspace-platform-starter/packaged
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}