Skip to content

Commit 7fd1c53

Browse files
committed
ci: add semantic-versioning release to GH action
1 parent 72d40e5 commit 7fd1c53

5 files changed

Lines changed: 7974 additions & 2673 deletions

File tree

.github/workflows/tests.yml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
push:
88
branches:
99
- master # although master is push protected we still keep it
10-
- development
1110
pull_request: # runs on all PR
1211
branches-ignore:
1312
- release-* # on release, we run an extended workflow so no need for this
@@ -75,3 +74,37 @@ jobs:
7574
with:
7675
path: './coverage/lcov.info'
7776
min_coverage: 98
77+
78+
release:
79+
name: Release
80+
concurrency: release
81+
if: ${{ github.event_name == 'push' && github.actor != 'dependabot[bot]' }}
82+
runs-on: ubuntu-latest
83+
needs: [lint, unittest]
84+
permissions:
85+
contents: write # to be able to publish a GitHub release & commit changelog changes
86+
issues: write # to be able to comment on released issues
87+
pull-requests: write # to be able to comment on released pull requests
88+
id-token: write # to enable use of OIDC for npm provenance
89+
steps:
90+
- name: Checkout
91+
uses: actions/checkout@v6
92+
with:
93+
fetch-depth: 0
94+
- name: Setup Node.js
95+
uses: actions/setup-node@v6
96+
with:
97+
node-version: 24
98+
cache: 'npm'
99+
- name: Install dependencies
100+
run: npm clean-install
101+
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
102+
run: npm audit signatures
103+
- name: Release
104+
env:
105+
NPM_CONFIG_PROVENANCE: true
106+
# Prefer a dedicated PAT (e.g. to push the release commit/tag to the
107+
# protected `master` branch); fall back to the built-in token otherwise.
108+
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
109+
run: npx semantic-release
110+

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Changelog
1+
# Changelog
22

33
## 5.0.0
44

0 commit comments

Comments
 (0)