2.6 KiB
Releasing go-lib/certs
This document describes the process for creating a release of the
go-lib/certs library.
The repository currently has the released tag v0.0.2. The next
release created from the current main branch should therefore use the
next patch version, for example v0.0.3, unless you intentionally
introduce a breaking or feature-level version bump.
Overview
Releases in this project are managed via Git tags. When you push a
tag matching the pattern v* (for example, v0.0.3), the Drone
pipeline automatically:
- Runs quality checks (tests, coverage gate, vet, vulnerability scan)
- Generates release notes from commits
- Creates a source archive (
sources.tar.gz) - Publishes a release to Gitea with attached artifacts
Versioning
This library follows semantic versioning: MAJOR.MINOR.PATCH
(for example, v1.2.3).
v1.0.0: breaking API changesv1.1.0: backward-compatible featuresv1.0.1: backward-compatible fixes
Prerequisites
Before creating a release, ensure:
- Working tree is clean (
git status) - Tests pass locally (
go test ./...) - Coverage is at least 80%
- Dependencies are tidy (
go mod tidy) - Documentation is up to date (README/docs)
Create a Release
1. Prepare (optional)
Update docs, examples, or changelog if needed:
git add README.md CHANGELOG.md docs/
git commit -m "docs: prepare release"
2. Create tag
git tag -a v0.0.3 -m "Release v0.0.3"
3. Push tag
git push origin v0.0.3
4. Verify pipeline and release
After pushing the tag, verify in Drone and Gitea:
- Pipeline succeeded for tag build
- Gitea release exists with artifacts:
.build/coverage.txt.build/sources.tar.gz.build/release-notes.md
Install Released Version
# latest
go get scm.yoorie.de/go-lib/certs
# specific
go get scm.yoorie.de/go-lib/certs@v0.0.3
Troubleshooting
Coverage below threshold
Run locally and inspect uncovered code:
go test -v -coverprofile .build/coverage.out ./...
go tool cover -func .build/coverage.out
Release step fails
Common causes:
- Missing Drone secret
gitea_token - Tag does not match
v* - Earlier pipeline step failed
Wrong tag pushed
git tag -d v0.0.3
git push origin :refs/tags/v0.0.3
Then create and push the corrected tag.
Release Checklist
- Tests pass locally
- Coverage is at least 80%
go vet ./...passesgovulncheck ./...is clean or reviewed- Tag
vX.Y.Zcreated and pushed - Drone pipeline succeeded
- Gitea release contains expected artifacts