-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 966 Bytes
/
release.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: Release
on:
push:
tags:
- 'v[1-9]+.[0-9]+.[0-9]+'
jobs:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create or update release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
token: ${{ secrets.GITHUB_TOKEN }}
publish-npm:
needs: create-release
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
node-version: [lts/*]
steps:
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- name: Checkout code
uses: actions/checkout@v4
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}