Reviewed-on: #2 Co-authored-by: Jan Klattenhoff <jan@kjan.email> Co-committed-by: Jan Klattenhoff <jan@kjan.email> |
||
---|---|---|
.gitea/workflows | ||
images | ||
LICENSE | ||
README.md | ||
release.config.cjs |
CI Template
A template repository for setting up continuous integration and automatic semantic versioning with Gitea.
Features
- Automated semantic versioning with semantic-release
- Integration with Gitea for releases
- Changelog generation
- Pull request workflows
Setup Instructions
Follow these steps to set up the CI pipeline and release process:
1. Configure Branch Protection
Add yourself to the whitelist in the release branch protection rule.
Don't forget to save your changes.
2. Create the Release Branch
Create a new branch named release
.
The pipeline for release will start automatically but will fail on the first run. This is expected behavior.
3. Create the Initial Version Tag
Run the following commands to create and push the first version tag:
git tag v0.1.0
git push origin tag v0.1.0
4. Configure Pull Request Settings
Set up your repository's pull request settings as shown:
5. Set Up Deploy Keys
- Generate an SSH key pair (public and private)
- Add the public key to deploy keys named "release" with write access enabled
- Add the private key to the runner secret as
DEPLOY_KEY
Release Process
This template uses semantic versioning through conventional commits. When changes are merged to the release branch, a new version is automatically:
- Determined based on commit messages
- Tagged in Git
- Published as a release
- Added to the changelog
Commit Message Format
Follow the Conventional Commits specification:
feat: add new feature
(triggers MINOR version bump)fix: resolve bug
(triggers PATCH version bump)BREAKING CHANGE: redesign API
(triggers MAJOR version bump)
Getting Started
After completing the setup:
- Remove the images directory and this README
- Create feature branches from
main
for your work - Make changes and commit using conventional commit format
- Create pull requests to
main
(changes should be squashed when merged, although this is not required) - When ready for a release, create a PR from
main
torelease
- The PR to
release
will automatically:- Create a new version based on your commits
- Generate a changelog
- Merge changes back into
main
License
See the LICENSE file for details.