-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (50 loc) · 1.56 KB
/
node-js-publish.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
45
46
47
48
49
50
51
52
53
54
55
56
name: Node.js Publish
on:
release:
types: [created]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 🔐 Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit
# disable-sudo: true
# allowed-endpoints: >
# github.com:443
# registry.npmjs.org:443
# api.github.com:443
# nodejs.org:443
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: '14.x'
- run: npm ci
- run: npm run lint
- run: npm test
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- name: 🔐 Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit
# disable-sudo: true
# allowed-endpoints: >
# github.com:443
# registry.npmjs.org:443
# api.github.com:443
# nodejs.org:443
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: '14.x'
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_GUIDESMITHS }}