Skip to content
This repository was archived by the owner on Jul 20, 2025. It is now read-only.

Commit 0ac51ea

Browse files
feat: conventional commits with semantic release (#128)
* feat: conventional commits with semantic release * chore: add read workflow permission for CI workflow
1 parent c044848 commit 0ac51ea

File tree

11 files changed

+8987
-3746
lines changed

11 files changed

+8987
-3746
lines changed

.changeset/README.md

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

.changeset/config.json

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

.github/workflows/ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: ci
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
pull_request:
8+
branches:
9+
- "**"
10+
11+
jobs:
12+
lint_test:
13+
uses: babylonlabs-io/.github/.github/workflows/[email protected]
14+
with:
15+
run-build: true
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
11
name: publish
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches:
67
- main
7-
88
permissions:
9-
pull-requests: write
109
contents: write
1110

1211
jobs:
1312
lint_test:
14-
uses: babylonlabs-io/.github/.github/workflows/reusable_node_lint_test.yml@v0.11.1
13+
uses: babylonlabs-io/.github/.github/workflows/reusable_node_lint_test.yml@v0.13.1
1514
secrets: inherit
1615
with:
1716
run-build: true
18-
run-unit-tests: false
19-
run-changesets: true
20-
publish-command: |
21-
npm run release
17+
use-semantic-release: true

.husky/pre-commit

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
npx lint-staged
1+
npx lint-staged
2+
3+
# Only run commitlint if a commit message file was passed in
4+
if [ -n "$1" ] && [ -f "$1" ]; then
5+
npx --no-install commitlint --edit "$1"
6+
fi

.releaserc.json

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

0 commit comments

Comments
 (0)