-
Notifications
You must be signed in to change notification settings - Fork 25
43 lines (37 loc) · 1.05 KB
/
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
41
42
43
name: release
on:
release:
types: [created]
jobs:
test:
name: "test"
runs-on: ubuntu-latest
steps:
- name: check out repo
uses: actions/checkout@v3
- name: prepare release information
id: release
uses: manovotny/[email protected]
- name: setup node
id: setup-node
uses: actions/setup-node@v3
with:
always-auth: true
node-version: 20
registry-url: "https://registry.npmjs.org"
- name: install dependencies
run: npm ci
- name: run tests
run: npm run test
- name: build package
run: npm run build
- name: publish version
if: steps.release.outputs.tag == ''
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: publish tagged version
if: steps.release.outputs.tag != ''
run: npm publish --tag ${{ steps.release.outputs.tag }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}