Skip to content

Commit ec02618

Browse files
committed
feat(ci): add semantic-release config and GitHub workflow (#6)
1 parent 08200f6 commit ec02618

6 files changed

Lines changed: 6611 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
9+
jobs:
10+
release:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: 20
17+
- run: npm ci
18+
- run: npx semantic-release
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.releaserc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"branches": [
3+
"main",
4+
{
5+
"name": "develop",
6+
"prerelease": true
7+
}
8+
],
9+
"plugins": [
10+
"@semantic-release/commit-analyzer",
11+
"@semantic-release/release-notes-generator",
12+
"@semantic-release/changelog",
13+
"@semantic-release/git",
14+
"@semantic-release/github"
15+
],
16+
"preset": "conventionalcommits",
17+
"tagFormat": "v${version}"
18+
}

CHANGELOG.md

Whitespace-only changes.

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,16 @@ You can define default settings in `~/.http-cli.conf`:
4242
```
4343
USER_AGENT="http-cli/0.1 (https://github.com/ql4b/http-cli)"
4444
TIMEOUT=10
45-
```
45+
```
46+
47+
## Release Strategy
48+
49+
This project uses [semantic-release](https://semantic-release.gitbook.io/) to automate versioning and changelog generation.
50+
51+
- Commits to `main` trigger **stable releases** (e.g. `v1.2.3`)
52+
- Commits to `develop` trigger **prereleases** (e.g. `v1.3.0-beta.1`)
53+
54+
Releases are based on [Conventional Commits](https://www.conventionalcommits.org/), so use commit messages like:
55+
- `feat: add new feature`
56+
- `fix: correct bug`
57+
- `chore: update metadata`

0 commit comments

Comments
 (0)