-
Notifications
You must be signed in to change notification settings - Fork 9
69 lines (61 loc) · 1.95 KB
/
release.yml
File metadata and controls
69 lines (61 loc) · 1.95 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
68
69
name: release
on:
push:
branches: [master]
permissions:
id-token: write # Required for OIDC
contents: write
jobs:
release:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node-version: [24.x]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- name: Github checkout
uses: actions/checkout@v4
if: matrix.os == 'ubuntu-latest'
with:
fetch-depth: 0 # Fetch all history including tags for version checking
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- run: npm run lint:check
- run: npm audit --audit-level=critical
- run: npm run build
- run: npm run test:ci
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true
- name: build 🔧
run: npm run build
- name: Generate changelog
uses: jaywcjlove/changelog-generator@main
id: changelog
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Check for version change
id: version_check
run: ./scripts/check-version.sh . v
- name: Publish package on NPM 📦
if: steps.version_check.outputs.should_release == 'true'
run: npm publish
- name: Create GitHub Release
if: steps.version_check.outputs.should_release == 'true'
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.version_check.outputs.tag_name }}
name: ServerlessInsight ${{ steps.version_check.outputs.version }}
body: |
${{ steps.changelog.outputs.compareurl }}
${{ steps.changelog.outputs.changelog }}