feat(releaser): initial release v0.4.0
Complete GitFlow release automation tool for Conventional Commits workflows: - Core pipeline: branch parsing, tag discovery, commit analysis, version bump - Maven pom.xml read/write, git commit/tag, HTTPS push with token auth - GitLab release creation via API with auto-generated release notes - Configurable via .releaser.yml (tag_prefix, branch_pattern, commit_message, pom_path, gitlab) - CLI flags: --dry-run, --no-push, --no-commit, --tag-only, --branch, --pom, --tag-prefix, --branch-pattern - Dockerfile (multi-stage Alpine), .releaser.gitlab-ci.yml reusable template - Gitea CI (vet + staticcheck + test + build) and release (5-platform cross-compilation) workflows - Taskfile with build/test/cov/lint/fuzz/ci/docker tasks - 96% test coverage with real in-memory git repos and fuzz tests for all parsers Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
# releaser — GitLab CI component template
|
||||
#
|
||||
# Usage in your project's .gitlab-ci.yml:
|
||||
#
|
||||
# include:
|
||||
# - project: 'your-group/releaser'
|
||||
# ref: main
|
||||
# file: '.releaser.gitlab-ci.yml'
|
||||
#
|
||||
# stages:
|
||||
# - build
|
||||
# - test
|
||||
# - release
|
||||
#
|
||||
# release:
|
||||
# extends: .releaser:release
|
||||
#
|
||||
# Required CI variable (set at project or group level):
|
||||
# RELEASE_TOKEN — a GitLab project/group access token with scopes:
|
||||
# api + write_repository
|
||||
# (do NOT use CI_JOB_TOKEN — it cannot push tags back)
|
||||
|
||||
.releaser:release:
|
||||
stage: release
|
||||
image: ${RELEASER_IMAGE:-registry.example.com/releaser:latest}
|
||||
|
||||
variables:
|
||||
# Override in your job to change defaults
|
||||
RELEASER_EXTRA_ARGS: "" # e.g. "--no-push" or "--tag-prefix ''"
|
||||
GIT_DEPTH: 0 # full clone — required to find ancestor tags
|
||||
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH =~ /^release\/.+$/
|
||||
|
||||
before_script:
|
||||
# Configure git to push back using the release token over HTTPS.
|
||||
# CI_JOB_TOKEN cannot push tags, so a dedicated access token is required.
|
||||
- git remote set-url origin
|
||||
"https://oauth2:${RELEASE_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git"
|
||||
- git config user.email "${GITLAB_USER_EMAIL:-ci@releaser}"
|
||||
- git config user.name "${GITLAB_USER_NAME:-Releaser CI}"
|
||||
|
||||
script:
|
||||
- releaser
|
||||
--branch "$CI_COMMIT_BRANCH"
|
||||
$RELEASER_EXTRA_ARGS
|
||||
|
||||
environment:
|
||||
name: release/$CI_COMMIT_BRANCH
|
||||
Reference in New Issue
Block a user