-
Notifications
You must be signed in to change notification settings - Fork 164
46 lines (40 loc) · 1.12 KB
/
npm.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
name: NATS.js NPM release
on:
release:
types: [created]
jobs:
test:
strategy:
matrix:
node-version: [21.x]
deno-version: [1.43.1]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout NATS.js
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: "https://registry.npmjs.org"
- name: Use Deno Version ${{ matrix.deno-version }}
uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.deno-version }}
- run: npm install -g npm
- run: npm ci
- run: npm run prepack
- name: Set tag
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Test tag
run: |
npm run check-package
- run: npm run clean
- run: npm publish --provenance --access public --tag=latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}