Skip to content

Automate bi-annual action internals update to make action's support effortless #117

Description

@denismakogon

Proposal: Automate maintenance and releases

Summary

Automate the repeatable bi-annual maintenance and release work for oracle-actions/setup-java with GitHub-native workflows. The proposal keeps compatibility-affecting JDK configuration changes reviewable, while automating dependency updates, source monitoring, tagging, release notes, and advancing the major-version branch.

Problem

Releases currently require several manual, error-prone steps:

  • Checking whether the jdk.java.net page configuration needs to change.
  • Updating third-party GitHub Actions in workflows and action.yml.
  • Creating a correctly named immutable release tag.
  • Creating the corresponding GitHub Release.
  • Opening and merging the required fast-forward main to v1 pull request.

The generated URI properties are already refreshed automatically, but the surrounding maintenance and release procedure is not.

Proposed solution

Add the following automation.

1. Dependency update PRs

Add .github/dependabot.yml configured for the github-actions ecosystem on a weekly schedule. Dependabot will create reviewable pull requests when action dependencies used in workflows or the composite action change.

2. JDK page configuration audit

Add a daily (or weekly) jdk.java.net-page-audit.yml workflow that compares the configured Page.of(...) entries in src/ListOpenJavaDevelopmentKits.java with candidates published on the jdk.java.net front page.

When they differ, the workflow creates or updates one issue titled Update jdk.java.net page configuration, including both lists.

This is intentionally an issue rather than an automatic source edit. Changes to ga, ea/latest, ea/stable, named projects, and supported platforms are part of the action’s public behavior and need maintainer review. After a reviewed source change lands, the existing URI-properties updater continues to regenerate jdk.java.net-uri.properties automatically.

3. Release workflow

Add a manually dispatched release.yml workflow with a semantic-version input. It will:

  1. Require a matching CHANGELOG.md section.
  2. Create an annotated immutable vX.Y.Z tag at main.
  3. Create a GitHub Release with generated release notes.
  4. Create (or reuse) the documented main to v1 pull request.
  5. Optionally enable merge-commit auto-merge for that PR.

The workflow is retry-safe: if a prior run created the tag at the current main commit, a later run resumes by creating the missing GitHub Release and/or v1 PR.

Required repository configuration

  • Set repository Actions Workflow permissions to Read and write permissions so the built-in, ephemeral GITHUB_TOKEN can create tags, releases, and pull requests.
  • Enable Allow GitHub Actions to create and approve pull requests in repository Actions settings.
  • Permit github-actions[bot] to open and auto-merge the protected main to v1 PR.
  • Enable auto-merge in repository settings if unattended v1 advancement is desired.
  • Keep normal required checks and branch protections in place; automation should not bypass them.

Benefits

  • Reduces mechanical release work to a single workflow dispatch.
  • Keeps action dependency updates small and reviewable.
  • Detects upstream JDK-page changes promptly without silently altering the action’s compatibility contract.
  • Preserves the existing vX.Y.Z tag and mutable v1 branch release model.
  • Provides generated GitHub release notes and an auditable workflow history.

Acceptance criteria

  • Dependabot opens GitHub Action update PRs on its configured schedule.
  • The JDK audit creates or updates one issue when configured and published page candidates differ, and does nothing when they match.
  • A valid release dispatch creates exactly one vX.Y.Z tag and GitHub Release.
  • A release dispatch fails before tagging when the requested changelog section is absent.
  • A release dispatch opens or reuses a main to v1 pull request and can enable its auto-merge.
  • Re-running a partially completed release succeeds only when the existing tag points to the current main commit.

Out of scope

  • Automatically changing supported JDK aliases, named projects, or platform coverage without review.
  • Automatically selecting a semantic version or writing release notes into CHANGELOG.md.
  • Changing the action’s public inputs, defaults, or supported JDK providers.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions