-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (31 loc) · 938 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
on:
workflow_dispatch:
inputs:
tag:
description: 'The tag to apply to the published version in npm'
required: true
default: 'latest'
type: string
env:
JOB_NODE_VERSION: '20.17.0' # Chosen to match what is used internally by the Heroku CLI
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.JOB_NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
cache: yarn
- name: Install dependencies
run: yarn install --immutable --immutable-cache --check-cache
- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --provenance --tag ${{ github.event.inputs.tag }}