Skip to content

Commit 2310220

Browse files
feat: add semantic-release for automated npm publishing
CI now runs tests then auto-publishes to npm on push to main via semantic-release with OIDC provenance. Version reverted to 0.0.0-development — semantic-release manages versioning from commit messages.
1 parent 8f0cf55 commit 2310220

3 files changed

Lines changed: 31 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
branches: [main]
66
pull_request:
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
test:
1013
runs-on: ubuntu-latest

.releaserc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"branches": ["main"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
"@semantic-release/changelog",
7+
[
8+
"@semantic-release/npm",
9+
{
10+
"pkgRoot": "."
11+
}
12+
],
13+
[
14+
"@semantic-release/git",
15+
{
16+
"assets": ["package.json", "package-lock.json", "CHANGELOG.md"],
17+
"message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}"
18+
}
19+
],
20+
[
21+
"@semantic-release/github",
22+
{
23+
"successComment": "🎉 This release is published on npm: https://www.npmjs.com/package/nsec-tree-cli/v/${nextRelease.version}"
24+
}
25+
]
26+
]
27+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nsec-tree-cli",
3-
"version": "1.0.0",
3+
"version": "0.0.0-development",
44
"description": "Offline-first CLI for hierarchical Nostr identities",
55
"type": "module",
66
"engines": {

0 commit comments

Comments
 (0)