Skip to content

ci(release): automate signed release tags and release notes - #39544

Open
bircni wants to merge 20 commits into
go-gitea:mainfrom
bircni:ci/release-automation
Open

bircni wants to merge 20 commits into
go-gitea:mainfrom
bircni:ci/release-automation

Conversation

@bircni

@bircni bircni commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Automate release tagging as proposed in #39544 (comment), part of #39550.

A maintainer selects a release branch and version in the release-create-tag workflow. After approval through the release-signing environment, it pushes a GPG-signed tag. The tag starts the existing release build, which generates GitHub release notes with git-cliff from commits since the previous release, excluding PRs labeled skip-changelog.

CHANGELOG.md and release-candidate releases are removed. The workflow reuses the existing GPGSIGN_KEY, GPGSIGN_PASSPHRASE, and RELEASE_TOKEN repository secrets.

Before using the workflow:

  • Configure the release-signing environment for release/v* branches with maintainers as required reviewers.
  • Optionally enable immutable releases.

Closes #39550

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 2, 2026
@github-actions github-actions Bot added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Oct 2, 2026
@silverwind

silverwind commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

I propose we make it work like this:

The release commit/tag creation should be callable via on: workflow_dispatch, e.g. triggered on GitHub UI by a maintainer or higher permission.

  1. create auto-generated changelog since last tag on the branch, sectioned via conventional commits
  2. create a commit titled "v1.2.3" with changelog in body, signed with gpg key
  3. create a annotated tag on the release commit with the changelog in body, signed with gpg key

On tag creation (on: tags: **), the release workflow should then run and:

  • build the binaries and attach them to a new immutable github release
  • publish and upload the binaries to gitea.com
  • publish to other ecosystems like snap store

Blog post stays a manual optional action following the release.

Release commit could stay optional if no files change in the repo on release, but I prefer to have it to mark the release in the commit history.

@bircni bircni added the backport/v28 This PR should be backported to Gitea 28 label Oct 2, 2026
@bircni
bircni requested review from lunny and silverwind and a lite review from Copilot October 2, 2026 21:06
@bircni
bircni force-pushed the ci/release-automation branch from 2746691 to 68fca5b Compare October 3, 2026 10:56
@silverwind

Copy link
Copy Markdown
Member

Just delete CHANGELOG.md

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The cliff.toml BREAKING parser misclassifies ordinary conventional commits; the upgrade prompt also needs terminology updates.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Automates release-note generation and GPG-signed release tagging through GitHub Actions.

Changes:

  • Adds validation, authorization, dry-run, signing, and atomic publication.
  • Configures git-cliff and documents the release process.
  • Updates release references and spellcheck inputs.
File Description
tools/​release-tag.py Validates release inputs and repository state.
README.zh-tw.md Updates translated security guidance.
README.zh-cn.md Updates translated security guidance.
README.md Updates security patch guidance.
Makefile Includes current files in spellchecking.
docs/​release-management.md Documents the new release process.
contrib/​upgrade.sh Links users to GitHub Releases.
cliff.toml Defines release-note formatting and grouping.
CHANGELOG-archived.md Points to current GitHub releases.
.github/​workflows/​release-create-tag.yml Orchestrates preview, signing, and publication.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread cliff.toml Outdated
@bircni

bircni commented Oct 3, 2026

Copy link
Copy Markdown
Member Author

Just delete CHANGELOG.md

completely? what about the archived one?

@bircni
bircni requested a review from a team October 3, 2026 11:34
Comment thread .github/workflows/release-create-tag.yml Outdated
Comment thread tools/release-tag.py Outdated
bircni and others added 2 commits October 3, 2026 14:24
Generate release notes during publication and keep signed commit and tag messages short. Add a local script for deployment, Helm, and Terraform update PRs.
@bircni
bircni requested a review from wxiaoguang October 3, 2026 12:29
@silverwind

Copy link
Copy Markdown
Member

Doing some cleanups, also I'm sceptical regarding cliff, so I'm checking for alternatives too.

@bircni

bircni commented Oct 3, 2026

Copy link
Copy Markdown
Member Author

I really like cliff - 100% would recommend

Gitea releases change no files, so a release commit only added the need
for branch push rights and a race with new merges. The workflow now
pushes a signed annotated tag on the approved branch head, with release
notes in its body that a small ci-tools command generates from the
conventional commit titles, reusing the PR title parser instead of
git-cliff. The first release of a line starts its notes at the -dev tag
of its fork point. The downstream update script is left for a separate
PR.

Assisted-by: Claude Code:claude-opus-5-5
@silverwind

Copy link
Copy Markdown
Member

Pushed a rework in 6f3653e:

  1. Release notes come from a small release-notes command in tools/ci-tools.ts that groups the conventional commit titles with the existing PR title parser, replacing git-cliff and the TypeScript release tools.
  2. The workflow is a single job behind the release-signing environment that pushes only a signed annotated tag with the notes in its body. There is no release commit, since releases change no files.
  3. The previous release is the nearest tag of the same minor line, including the -dev tag at the release branch fork point, so the first release of a line gets correct notes.
  4. The tag workflow takes the GitHub release notes from the tag body.
  5. .changelog.yml and the skip-changelog labeling are removed, and tools/release-updates.ts is left for a separate PR.

This comment was written by Claude.

@bircni

bircni commented Oct 3, 2026

Copy link
Copy Markdown
Member Author

The workflow is a single job behind the release-signing environment that pushes only a signed annotated tag with the notes in its body. There is no release commit, since releases change no files.

Didnt we say we dont put the notes in its body.

The tag workflow takes the GitHub release notes from the tag body.

Not what we wanted

.changelog.yml and the skip-changelog labeling are removed, and tools/release-updates.ts is left for a separate PR.

why - remove it I like the label and it makes it visible more clear that this is not changelog relevant

@silverwind

Copy link
Copy Markdown
Member

I don't know about cliff. It's default template includes emoji, so needs a custom template in a strange language. Currently I have this in ci-tools.

@silverwind

Copy link
Copy Markdown
Member

My only reason is that I've been doing it that way in all my repos because I think it's only logical and adds useful info to the tag, but no strong feeling about it.

@wxiaoguang

Copy link
Copy Markdown
Contributor

My only reason is that I've been doing it that way in all my repos because I think it's only logical and adds useful info to the tag, but no strong feeling about it.

How other open source projects do? Or just "do as the Romans do"?

Keep the signed tag message to the version and generate the release
notes when the tag build creates the GitHub release, as discussed in
the review, so the tag stays small and the notes come from the same
place that publishes them.

Assisted-by: Claude Code:claude-opus-5-5
@silverwind

Copy link
Copy Markdown
Member

I'll remove it then, IDK how common it is to have messages in tags. I think most repos do not care because UI does not expose tag messages prominently.

@silverwind

Copy link
Copy Markdown
Member

Doing final cleanup now.

@silverwind

silverwind commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

After this is merged and before the release is done, enable this in GitHub UI at https://github.com/go-gitea/gitea/settings:

image

Pick the previous release as the highest stable version below the new
tag, which gives the same commit range as the -dev tags without needing
them. The skip-changelog label alone decides what is left out, since
the labeler already applies it to chore and ci PRs. The git-cliff action
runs git-cliff twice, so it uses RELEASE_TOKEN for the larger API rate
limit. The workflows, config and docs lose what that made redundant.

Assisted-by: Claude Code:claude-opus-5-5
@silverwind silverwind changed the title ci(release): automate changelog preparation and signed release tagging ci(release): automate signed release tags and release notes Oct 3, 2026
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Oct 3, 2026
@bircni

bircni commented Oct 3, 2026

Copy link
Copy Markdown
Member Author

@lunny we need the secrets configured

Comment thread cliff.toml Outdated
@@ -0,0 +1,10 @@
[git]
commit_parsers = [
{ field = "remote.pr_labels", pattern = "^skip-changelog$", skip = true },

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@silverwind why not skip per type?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because skip-changelog could be added manually.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then the type is wrong

@silverwind silverwind Oct 3, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What type? We have 2 types that imply skip-changelog. And users should be free to manually set the label.

Thought I guess it is unlikely that it's needed so it could be purely type-based too and then we should delete the label because it serves no purpose.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't support that
Give me one real reason how this could happen

Why would you call a commit "feat" and skip changelog

@silverwind silverwind Oct 4, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adjusted to what? don't force me to read the diff.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wxiaoguang whats your opinion?

@wxiaoguang wxiaoguang Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no opinion actually. Either is fine ( label-only, commit-message-only, commit-message + label)

(It's just unclear to me what we would do with "skip-changelog" label in the future)


Update: see next comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"What type? We have 2 types that imply skip-changelog. And users should be free to manually set the label."

I think it is true.

For example: a feature landed on main branch, then a follow-up "fix" to correct it. The "fix" prefix is correct because it does fix bugs, but we don't need to mention such follow-up fix in changelog, since it belongs to the feature.

Comment thread docs/release-management.md Outdated
Release branches are already described in the versions section.

Assisted-by: Claude Code:claude-opus-5-5
@lunny

lunny commented Oct 3, 2026

Copy link
Copy Markdown
Member

I think we already have GPGSIGN_KEY and GPGSIGN_PASSPHRASE which could be reused and RELEASE_TOKEN is already ready.

@bircni

bircni commented Oct 3, 2026

Copy link
Copy Markdown
Member Author

I think we already have GPGSIGN_KEY and GPGSIGN_PASSPHRASE which could be reused and RELEASE_TOKEN is already ready.

Which email address is registered to it?

@lunny

lunny commented Oct 3, 2026

Copy link
Copy Markdown
Member

GPGSIGN_KEY

teabot [at] gitea.io

@bircni

bircni commented Oct 3, 2026

Copy link
Copy Markdown
Member Author

@lunny @silverwind

created the environment + adjusted the identity + adjusted the secrets - should be ready now

@bircni
bircni requested a review from silverwind October 3, 2026 22:47
@GiteaBot GiteaBot added lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Oct 3, 2026
@bircni

bircni commented Oct 3, 2026

Copy link
Copy Markdown
Member Author

its ready

@bircni

bircni commented Oct 4, 2026

Copy link
Copy Markdown
Member Author

@silverwind we forgot one point - the security section

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/v28 This PR should be backported to Gitea 28 lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automate CI Release

6 participants