-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (46 loc) · 1.4 KB
/
Copy pathrelease.yml
File metadata and controls
59 lines (46 loc) · 1.4 KB
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
52
53
54
55
56
57
58
59
name: Release
on:
push:
tags:
- 'v*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
release:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: 🛎 Checkout
uses: actions/checkout@v3
- name: 🛠️ Setup Node
uses: actions/setup-node@v3
with:
node-version-file: ./.nvmrc
registry-url: https://registry.npmjs.org
- name: 🛠️ Install Dependencies
run: npm ci
- name: 🧑🏫 Lint
run: npm run lint
- name: 👮♂️ Check Formatting
run: npm run format
- name: 👨🔬 Run Tests
run: npm run test
- name: 💯 Report Coverage to Coveralls
uses: coverallsapp/github-action@v2
- name: 👷♂️ Build Library
run: npm run build
- name: 📦 Create Package
id: package
run: |
npm pack
echo "filename=$(ls *.tgz | grep -m1 tgz)" >> "$GITHUB_OUTPUT"
- name: 🎁 Create GitHub Release
uses: ncipollo/release-action@v1
with:
name: Release ${{ github.ref_name }}
artifacts: ${{ steps.package.outputs.filename }}
- name: 🌍 Publish Package to NPM Registry
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_CI_TOKEN }}
run: npm publish ${{ steps.package.outputs.filename }}