-
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (44 loc) · 1.35 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
44
45
46
47
48
49
name: release
on:
push:
tags:
- 'v*.*.*'
jobs:
publish:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Test
run: npm run test
- name: Compile
run: npm run build --if-present
- name: Get Package Version
id: get-package-version
uses: stevenbenitez/get-package-version-action@v1
- name: Lint Package
run: npm run package:lint
- name: Publish
run: |
npm publish --tag unsure
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Tag Beta
if: contains(steps.get-package-version.outputs.version, '-beta')
run: |
npm dist-tags add reporter-minimal@${{ steps.get-package-version.outputs.version }} beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Tag Release
if: ${{ !contains(steps.get-package-version.outputs.version, '-beta') }}
run: |
npm dist-tags add reporter-minimal@${{ steps.get-package-version.outputs.version }} latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}