-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1.09 KB
/
.publish-npm.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
name: .publish-npm
on:
workflow_call:
secrets:
npm-auth-token:
required: true
description: required credentials to authenticate with the aws account under which to publish
jobs:
install:
uses: ./.github/workflows/.install.yml
publish:
runs-on: ubuntu-20.04
needs: [install]
steps:
- name: checkout
uses: actions/checkout@v3
- name: set node-version
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org/'
node-version-file: '.nvmrc'
- name: node-modules cache get
uses: actions/cache/restore@v4
id: cache
with:
path: ./node_modules
key: ${{ needs.install.outputs.node-modules-cache-key }}
- name: node-modules cache miss install
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci --ignore-scripts --prefer-offline --no-audit
- name: build
run: npm run build
- name: publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.npm-auth-token }}