-
Notifications
You must be signed in to change notification settings - Fork 32
67 lines (65 loc) · 1.58 KB
/
Copy pathrelease.yaml
File metadata and controls
67 lines (65 loc) · 1.58 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
60
61
62
63
64
65
66
67
name: Actions
on:
push:
branches:
- master
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
- name: Install Dependencies
run: npm ci
- name: Run linters
run: npm run lint
- name: Run commitlint
run: npx commitlint --from=HEAD~1
test:
name: Test
runs-on: ubuntu-latest
needs: lint
strategy:
matrix:
node-version: ['lts/hydrogen', 'lts/iron', 'lts/*']
steps:
- uses: actions/checkout@v5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run test:cov
env:
CI: true
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
release:
name: Release
runs-on: ubuntu-latest
needs: [lint, test]
permissions:
id-token: write
contents: write
pull-requests: write
issues: write
steps:
- name: Checkout
uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
- run: npm ci
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v5.0.2
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
with:
branches: |
['master', 'main']