-
-
Notifications
You must be signed in to change notification settings - Fork 5
39 lines (37 loc) · 920 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
name: Publish Package to npmjs
on:
workflow_dispatch:
inputs:
options:
description: 'Publish options'
required: true
default: '--dry-run'
type: choice
options:
- '--dry-run'
- '--provenance --access public'
jobs:
log-inputs:
runs-on: ubuntu-latest
steps:
- run: |
echo "--dry-run: $OPTIONS"
env:
OPTIONS: ${{ inputs.options }}
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install -g npm
- run: npm ci
- run: npm publish ${OPTIONS}
env:
OPTIONS: ${{ inputs.options }}
NODE_AUTH_TOKEN: ${{ secrets.VTBOT_NPM_TOKEN }}