Skip to content

Commit 34ffe9c

Browse files
authored
refactor: switch from release-please to semantic-release (#32)
Replace release-please with semantic-release for automated versioning and changelog generation. Semantic-release uses conventional commits to determine version bumps and generates changelogs automatically.
1 parent 2fb6b67 commit 34ffe9c

7 files changed

Lines changed: 6951 additions & 358 deletions

File tree

.github/workflows/prerelease.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,40 @@
1-
name: Create Release
1+
name: Release
22

33
on:
4-
workflow_dispatch:
4+
push:
5+
branches:
6+
- main
57

68
permissions:
79
contents: write
10+
issues: write
811
pull-requests: write
912

1013
jobs:
1114
release:
12-
name: Create Release PR
15+
name: Release
1316
runs-on: ubuntu-latest
1417

1518
steps:
16-
- name: Run release-please
17-
uses: googleapis/release-please-action@v4
19+
- name: Checkout
20+
uses: actions/checkout@v4
1821
with:
19-
token: ${{ secrets.GITHUB_TOKEN }}
20-
config-file: release-please-config.json
21-
manifest-file: .release-please-manifest.json
22-
prerelease: false
22+
fetch-depth: 0
23+
persist-credentials: false
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 'lts/*'
29+
cache: 'npm'
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Run tests
35+
run: npm test
36+
37+
- name: Release
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
run: npm run semantic-release

.release-please-manifest.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

.releaserc.json

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+
[
7+
"@semantic-release/changelog",
8+
{
9+
"changelogFile": "CHANGELOG.md"
10+
}
11+
],
12+
[
13+
"@semantic-release/npm",
14+
{
15+
"npmPublish": false
16+
}
17+
],
18+
[
19+
"@semantic-release/git",
20+
{
21+
"assets": ["CHANGELOG.md", "package.json", "package-lock.json"],
22+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
23+
}
24+
],
25+
"@semantic-release/github"
26+
]
27+
}

0 commit comments

Comments
 (0)