-
-
Notifications
You must be signed in to change notification settings - Fork 517
51 lines (46 loc) · 1.23 KB
/
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
name: Publish to NPM
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
permissions: {}
jobs:
ci:
permissions:
contents: read # for actions/checkout
security-events: write # for codeql-action
uses: ./.github/workflows/ci.yml
changelog:
permissions:
contents: read # for actions/checkout
uses: ./.github/workflows/changelog.yml
npm-publish:
environment:
name: npm-publish
url: https://www.npmjs.com/package/graphql-voyager/v/${{github.ref_name}}
needs:
- ci
- changelog
permissions:
contents: read # for actions/checkout
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: npm
node-version-file: 'package.json'
# 'registry-url' is required for 'npm publish'
registry-url: 'https://registry.npmjs.org'
- uses: actions/download-artifact@v4
with:
name: npmDist
path: npmDist
- name: Publish package on NPM
run: npm publish ./npmDist
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}