Skip to content

Java release process#378

Draft
akafredperry wants to merge 11 commits intotrunkfrom
java_release_process
Draft

Java release process#378
akafredperry wants to merge 11 commits intotrunkfrom
java_release_process

Conversation

@akafredperry
Copy link
Copy Markdown
Collaborator

closes #377

- What I did
Added Release workflow that should be triggerable from GitHub UI. This creates official versions of the Java SDK and uploads the artifacts to maven central.

- How I did it

  • New release.yml workflow. This will
    • update pom versions
    • update README
    • update CHANGELOG.md
    • commit changes
    • tag
    • deploy to maven central
    • update pom version to new dev version
    • commit changes
    • push everything
  • Added instructions to README.md
  • Fixed minor problems in module poms

- How to verify it

  • I have tested by temporarily adding an on branch trigger, but workflow-dispatch is only available once the workflow is on trunk. See result here.. https://central.sonatype.com/artifact/org.atsign/at_client
  • Once this change is merged we can test releasing off trunk (and adjust if required).

- Description for the changelog

build: release workflow

@akafredperry akafredperry self-assigned this Mar 30, 2026
@akafredperry akafredperry requested review from cpswan and gkc March 30, 2026 06:51
Copy link
Copy Markdown
Member

@cpswan cpswan left a comment

Choose a reason for hiding this comment

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

I've not had a chance to thoroughly review this yet, but let's get the SHA pinning done

@akafredperry akafredperry force-pushed the java_release_process branch from 23e7339 to 04e92ed Compare March 30, 2026 10:44
Copy link
Copy Markdown
Member

@cpswan cpswan left a comment

Choose a reason for hiding this comment

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

We should be generating an SBOM and SLSA attestations during the release workflow (though I'm happy to do that as a standalone piece of work once the basic mechanics are in place).

https://github.com/atsign-foundation/noports/blob/trunk/.github/workflows/npt_flutter_release.yaml is a good example of a workflow where we've recently added that stuff.

default: ''

permissions:
contents: write
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.

permissions should be job scoped rather than for the whole workflow.

Suggested change
contents: write
contents: read

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

gotcha, that's done

name: Release

on:
workflow_dispatch:
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.

Normally we trigger a release with a tag that's generated by creating a GitHub release.

We often also have a workflow_dispatch trigger for manual testing.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I did start off with that approach but ran into problems in that the version tag should be on the commit that updated the pom versions, README edit and CHANGELOG. I guess we could have 2 lots of tags, those that trigger the release workflow and then a corresponding version tag that gets added as part of the workflow. Shall I go with that?

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.

Take a look at https://github.com/atsign-foundation/noports/blob/trunk/.github/workflows/multibuild.yaml for how we handle similar needs for NoPorts

server-username: "CENTRAL_USERNAME" # env variable for username in deploy
server-password: "CENTRAL_TOKEN" # env variable for token in deploy
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: "GPG_PASSPHRASE" # env variable for GPG private key passphrase
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.

Should probably be a secret rather than an ENV variable

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The values are all secrets, but the comment is ambiguous, what is being configured in line 1,2 and 4 is the name of environment variables used in the setup-java. These match the secrets names. If that makes sense?

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.

Not really. If there's no ${{ ... }} to bring things in then where are the values being sourced from?


- name: Configure git
run: |
git config user.name "github-actions"
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.

Suggested change
git config user.name "github-actions"
git config user.name 'library-action[bot]'

- name: Configure git
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
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.

Suggested change
git config user.email "github-actions@github.com"
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'

id: compute
run: |
if [ -n "${{ inputs.release_version }}" ]; then
RELEASE=${{ inputs.release_version }}
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.

Likely needs to be reworked to use a release tag

@akafredperry
Copy link
Copy Markdown
Collaborator Author

We should be generating an SBOM and SLSA attestations during the release workflow (though I'm happy to do that as a standalone piece of work once the basic mechanics are in place).

https://github.com/atsign-foundation/noports/blob/trunk/.github/workflows/npt_flutter_release.yaml is a good example of a workflow where we've recently added that stuff.

I have create an issue for this and assigned for next sprint #383

@akafredperry akafredperry marked this pull request as draft March 30, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create release process for Java SDK

2 participants