Hi,

An update on the Trusted Publishing proof of concept for Maven projects (
https://github.com/apache/tooling-trusted-releases/issues/1844).

Repository: https://github.com/apache/tooling-atr-maven-example
ATR project: https://releases.apache.org/projects/tooling-atr-maven-example

The assumption is to keep the configuration and the workflow as simple as
possible.
The goal is that a release manager can do the whole release with a single
run of the workflow
without manual work on a local machine.

We can discuss the assumption what I make in the project, and the problems
I found with the current release process.

Done since the last mail:

- I prepared GitHub OIDC support for atr-maven-plugin:
https://github.com/apache/tooling-atr-maven-plugin/pull/137
- Pushing to ATR is enabled in the project.
- Releases 1.0.3, 1.0.4 and 1.0.5 were pushed to ATR with Trusted
Publishing.
- A release workflow was added, described below.

Release workflow:
https://github.com/apache/tooling-atr-maven-example/blob/main/.github/workflows/release.yml

It runs mvn release:prepare release:perform with the push-to-atr profile
from the ASF parent POM:

- release:prepare sets the release version, commits, tags and pushes to
main with GITHUB_TOKEN, then commits and pushes the next development
version.
- release:perform builds the release from the tag.
- atr-maven-plugin exchanges the GitHub OIDC token for an ATR token,
creates the version in ATR when it does not exist,
  and uploads the source release archive with its checksum, together with
the release commit as the source commit.

Problems found:

1. Branch protection check

ATR reports for 1.0.3 and 1.0.4: "Could not confirm that refs/heads/main
was protected: no active rule for creation, pull_request".

For a branch ATR needs a ruleset with creation, and either update, or
pull_request and non_fast_forward.
The default ruleset from .asf.yaml has only deletion and non_fast_forward.
Also, the convenience syntax of .asf.yaml has no option for creation,
so the raw payload syntax is needed, which is more complicated and less
readable.

After adding creation, 1.0.5 reports only: "no active rule for
pull_request".

Adding pull_request is harder. release:prepare pushes the release commits
to main with GITHUB_TOKEN,
so github-actions[bot] would need to bypass the rule.
ATR accepts a bypass only by a committee member or a release manager.
The commit after a release, "prepare for next development iteration", is
pushed by the bot, so the next release started from it would get a concern
anyway.
1.0.5 was started from such a commit, today its push passes only because
there is no pull_request rule.

2. Source commit not in the history

ATR reports: "Source commit is not in the history of its GitHub repository"
for the compare.source_trees check.

The plugin sends the release commit created by release:prepare as the
source commit.
ATR looks for it only in the history of the commit the workflow ran from.
The release commit is created during the run, so it is a descendant of that
commit, not an ancestor,
and it is not found, even though it is on main and tagged.
The source tree is not compared with the archive at all.

Next steps:

- Discuss the problems above, how to solve them in ATR or in the release
process.
- Welcome to review the project, especially the POM, .asf.yaml and the
release workflow, and share your comments.


On Tue, 17 Nov 2026 at 22:03, Slawomir Jaranowski <[email protected]>
wrote:

> Hi,
>
> I'd like to share the work on the Trusted Publishing proof of concept for
> Maven projects (
> https://github.com/apache/tooling-trusted-releases/issues/1844).
>
> Repository: https://github.com/apache/tooling-atr-maven-example
>
> The goal is to show that an ASF Maven project can make a release from
> GitHub Actions with the standard Maven release process and push it to ATR
> with Trusted Publishing, without personal tokens.
>
> Done so far:
>
> - The ATR project is created from .asf.yaml.
> - A small multi-module Maven project using the ASF parent POM and its
> push-to-atr profile.
> - A GitHub workflow that runs mvn verify.
> - A release workflow that runs release:prepare and release:perform. The
> first release, 1.0.0, was made with it.
> - The build uses the latest SNAPSHOT of atr-maven-plugin for testing
> purposes.
>
> Not enabled yet:
>
> - Signing and deployment to the repository. Postponed to the next phase.
> - Pushing to ATR. The plugin runs in dry run mode, waiting for OIDC
> support.
>
> Next steps:
>
> 1. I will work on adding GitHub OIDC support to atr-maven-plugin, so it
> can log in to ATR without a personal token.
> 2. Turn off dry run and push a real release to ATR.
> 3. Add a CI job that checks build reproducibility.
>
> Comments and ideas are welcome.
>
> --
> Sławomir Jaranowski
>


-- 
Sławomir Jaranowski

Reply via email to