-
Notifications
You must be signed in to change notification settings - Fork 22
40 lines (32 loc) · 980 Bytes
/
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
name: Publishing
on:
release:
types:
- published
jobs:
publish:
name: docker
runs-on: [self-hosted, Linux, medium, ephemeral]
permissions:
contents: read
steps:
- name: Harden Runner
uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Setup NodeJS Environment
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 18.x
- name: Install dependencies
run: npm install
- name: Create .npmrc
run: |
touch .npmrc
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc
- name: Publish
run: npm publish --public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}