Skip to content

Commit 4d5f1ac

Browse files
authored
feat!: convert to semantic-release with NPM trusted publishing (#257)
## Summary - Migrate from manual versioning to automated releases using semantic-release - Configure NPM trusted publishing with OIDC for secure, tokenless npm authentication - Add release workflow with manual trigger (workflow_dispatch), test matrix (Node 20, 22, 24), and provenance support - Update dependabot to use conventional commit prefixes (`chore(deps)`) ## Changes - **package.json**: Set version to `0.0.0-semantically-released`, add repository field, publishConfig with public access and provenance, add semantic-release devDependency - **.releaserc.json**: Standard configuration with commit-analyzer, release-notes-generator, npm, and github plugins - **.github/workflows/release.yml**: Manual release workflow with OIDC permissions for NPM trusted publishing - **.github/dependabot.yml**: Add `chore(deps)` prefix for conventional commits ## Test plan - [ ] Verify build workflow passes on this PR - [ ] After merge, configure NPM trusted publishing for the package on npmjs.com - [ ] Manually trigger the release workflow to publish v1.0.0 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <[email protected]> Closes #255 Closes #256 BREAKING CHANGE: This migrates from manual versioning to automated releases using semantic-release with NPM's OIDC-based trusted publishing.
1 parent bf85083 commit 4d5f1ac

File tree

4 files changed

+85
-1
lines changed

4 files changed

+85
-1
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "weekly"
7+
commit-message:
8+
prefix: "chore(deps)"
79
groups:
810
dev-deps:
911
dependency-type: "development"
@@ -23,6 +25,8 @@ updates:
2325
directory: "/"
2426
schedule:
2527
interval: "weekly"
28+
commit-message:
29+
prefix: "chore(deps)"
2630
groups:
2731
actions-deps:
2832
patterns:

.github/workflows/release.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
test:
8+
name: Test
9+
runs-on: ubuntu-latest
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
node_version: ['20', '22', '24']
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Setup Node ${{ matrix.node_version }}
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: ${{ matrix.node_version }}
23+
cache: 'npm'
24+
25+
- name: Install Dependencies
26+
run: npm ci
27+
28+
- name: Build
29+
run: npm run build
30+
31+
release:
32+
name: Release
33+
needs: test
34+
runs-on: ubuntu-latest
35+
permissions:
36+
contents: write
37+
issues: write
38+
pull-requests: write
39+
id-token: write
40+
steps:
41+
- uses: actions/checkout@v4
42+
with:
43+
fetch-depth: 0
44+
45+
- name: Setup Node
46+
uses: actions/setup-node@v4
47+
with:
48+
node-version: '22'
49+
cache: 'npm'
50+
registry-url: 'https://registry.npmjs.org'
51+
52+
- name: Install Dependencies
53+
run: npm ci
54+
55+
- name: Build
56+
run: npm run build
57+
58+
- name: Release
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
NPM_CONFIG_PROVENANCE: true
62+
run: npx semantic-release

.releaserc.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"branches": ["main"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
"@semantic-release/npm",
7+
"@semantic-release/github"
8+
]
9+
}

package.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
{
22
"name": "@kiwiproject/vue-dynamic-property-provider",
3-
"version": "0.13.0",
3+
"version": "0.0.0-semantically-released",
44
"private": false,
55
"type": "module",
6+
"repository": {
7+
"type": "git",
8+
"url": "git+https://github.com/kiwiproject/vue-dynamic-property-provider.git"
9+
},
10+
"publishConfig": {
11+
"access": "public",
12+
"provenance": true
13+
},
614
"files": [
715
"dist"
816
],
@@ -26,6 +34,7 @@
2634
"vue": "^3.5.26"
2735
},
2836
"devDependencies": {
37+
"semantic-release": "^24.2.4",
2938
"@tailwindcss/vite": "4.1.18",
3039
"@vitejs/plugin-vue": "^6.0.3",
3140
"@vue/tsconfig": "0.8.1",

0 commit comments

Comments
 (0)