Skip to content

Commit 9c326e4

Browse files
authored
feat: semantic release (#1)
1 parent b4c1553 commit 9c326e4

File tree

5 files changed

+6701
-416
lines changed

5 files changed

+6701
-416
lines changed

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read # for checkout
10+
11+
jobs:
12+
release:
13+
name: Release
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write # to be able to publish a GitHub release
17+
issues: write # to be able to comment on released issues
18+
pull-requests: write # to be able to comment on released pull requests
19+
id-token: write # to enable use of OIDC for npm provenance
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: '22.x'
29+
- name: Install Dependencies
30+
run: npm ci
31+
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
32+
run: npm audit signatures
33+
- name: Release
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
37+
run: npx semantic-release

.github/workflows/tests.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
1-
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3-
4-
name: Node.js CI
1+
name: Run tests
52

63
on:
74
push:
85
branches: [ "main" ]
96
pull_request:
107
branches: [ "main" ]
118

9+
permissions:
10+
contents: read # for checkout
11+
1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
16-
1715
strategy:
1816
matrix:
1917
node-version: [18.x, 20.x, 22.x]
2018
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
21-
2219
steps:
23-
- uses: actions/checkout@v4
24-
- name: Use Node.js ${{ matrix.node-version }}
25-
uses: actions/setup-node@v4
26-
with:
27-
node-version: ${{ matrix.node-version }}
28-
cache: 'npm'
29-
- run: npm ci
30-
- run: npm run build --if-present
31-
- run: npm test
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- name: Setup Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
cache: 'npm'
27+
- name: Install Dependencies
28+
run: npm ci
29+
- name: Build
30+
run: npm run build --if-present
31+
- name: Test
32+
run: npm test

0 commit comments

Comments
 (0)