feat(ci): add release-please automated versioning workflow

This commit is contained in:
SaelixCode
2026-03-24 19:01:09 -04:00
parent c8047c209c
commit c294def7cc
5 changed files with 49 additions and 1 deletions
+20
View File
@@ -0,0 +1,20 @@
name: Release Please
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
+3
View File
@@ -0,0 +1,3 @@
{
".": "0.1.0"
}
+3
View File
@@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- **fix(ci):** `docker-publish.yml` was triggered by `release: types: [published]` (GitHub Release event) instead of `push: tags: v*` — pushing a git tag never fired the workflow. Changed trigger to `push: tags: v*` and updated `enable` conditions from `github.event_name == 'release'` to `startsWith(github.ref, 'refs/tags/v')` so any `v*` tag push automatically builds and publishes `latest` + semver tags to Docker Hub without requiring a manual GitHub Release.
### Added
- **feat(ci):** Automated versioning via `release-please` — on every push to `main`, the `release-please` workflow opens or updates a Release PR with a generated CHANGELOG entry and `package.json` version bump. Merging the Release PR creates the `vX.Y.Z` tag which triggers `docker-publish.yml`. Version bumps follow Conventional Commits: `fix:` → patch, `feat:` → minor, `feat!:` / `BREAKING CHANGE:` → major.
---
## [0.1.0] - 2026-03-24
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "sencho",
"version": "1.0.0",
"version": "0.1.0",
"description": "",
"main": "index.js",
"scripts": {
+22
View File
@@ -0,0 +1,22 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"packages": {
".": {
"release-type": "node",
"bump-minor-pre-major": true,
"changelog-path": "CHANGELOG.md",
"changelog-sections": [
{ "type": "feat", "section": "### Added" },
{ "type": "fix", "section": "### Fixed" },
{ "type": "perf", "section": "### Fixed" },
{ "type": "revert", "section": "### Fixed" },
{ "type": "security", "section": "### Security" },
{ "type": "docs", "section": "### Documentation", "hidden": true },
{ "type": "chore", "section": "### Miscellaneous", "hidden": true },
{ "type": "ci", "section": "### CI/CD", "hidden": true },
{ "type": "refactor", "section": "### Changed", "hidden": true },
{ "type": "test", "section": "### Tests", "hidden": true }
]
}
}
}