Skip to content

Commit 037d526

Browse files
committed
Configure semantic-release
1 parent 350ed5d commit 037d526

File tree

4 files changed

+94
-0
lines changed

4 files changed

+94
-0
lines changed

.github/workflows/release.yml

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

.releaserc.json

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

CONTRIBUTING.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Commit Message Convention
2+
3+
This project uses [Conventional Commits](https://conventionalcommits.org/) for automated version management and release notes generation.
4+
5+
## Format
6+
7+
```
8+
<type>[optional scope]: <description>
9+
10+
[optional body]
11+
12+
[optional footer(s)]
13+
```
14+
15+
## Types
16+
17+
- **feat**: A new feature (triggers a minor version bump)
18+
- **fix**: A bug fix (triggers a patch version bump)
19+
- **docs**: Documentation only changes
20+
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
21+
- **refactor**: A code change that neither fixes a bug nor adds a feature
22+
- **perf**: A code change that improves performance
23+
- **test**: Adding missing tests or correcting existing tests
24+
- **chore**: Changes to the build process or auxiliary tools and libraries
25+
26+
## Breaking Changes
27+
28+
Add `BREAKING CHANGE:` in the footer or append `!` after the type/scope to indicate breaking changes (triggers a major version bump).
29+
30+
## Examples
31+
32+
```
33+
feat: add support for PHP 8.4
34+
fix: resolve memory leak in CSV parsing
35+
docs: update installation instructions
36+
feat!: drop support for PHP 7.4
37+
feat(csv): add new export format
38+
39+
BREAKING CHANGE: PHP 7.4 is no longer supported
40+
```
41+
42+
## Scopes (optional)
43+
44+
You can use scopes to specify which part of the codebase is affected:
45+
- `csv`: CSV-related functionality
46+
- `holidays`: Holiday calculation features
47+
- `microplate`: Microplate handling
48+
- `phpstan`: PHPStan rules
49+
- `scanner`: Scanner-related features
50+
- `samplesheet`: Sample sheet functionality

package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "mll-lab-php-utils",
3+
"private": true,
4+
"devDependencies": {
5+
"@semantic-release/changelog": "^6.0.3",
6+
"@semantic-release/commit-analyzer": "^13.0.0",
7+
"@semantic-release/git": "^10.0.1",
8+
"@semantic-release/github": "^11.0.0",
9+
"@semantic-release/release-notes-generator": "^14.0.1",
10+
"semantic-release": "^24.0.0"
11+
}
12+
}

0 commit comments

Comments
 (0)