Skip to content

Add automated releases#1127

Merged
martincostello merged 6 commits intomainfrom
automated-releases
Dec 16, 2025
Merged

Add automated releases#1127
martincostello merged 6 commits intomainfrom
automated-releases

Conversation

@martincostello
Copy link
Member

@martincostello martincostello commented Dec 5, 2025

Add workflows to automate releases if the Java instrumentation version has changed since the last release.

If it has, then that version is used for the release.

Only changes to the following line of code are considered:

otelInstrumentationVersion = "2.22.0"

Any other changes will not trigger a release.


Based on the implementation from the following PRs:

TODO

  • Add secrets to Vault
  • Update GitHub token broker configuration
  • Verify generating GitHub tokens Test
  • Update RELEASING.md

Add workflows to automate releases if the Java instrumentation version has changed since the last release.

If it has, then that version is used for the release.
- Scope permissions to job not workflow.
- Add concurrency.
- Add some spacing for readability.
@martincostello martincostello added enhancement New feature or request github_actions Pull requests that update GitHub Actions code labels Dec 5, 2025
fi

- name: Publish release
if: steps.get-changes.outputs.has-changes == 'true'
Copy link
Member Author

Choose a reason for hiding this comment

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

This will trigger the workflow if any changes happen to build.gradle, but the other workflow will no-op if there's no actual relevant changes.

Copy link
Member Author

Choose a reason for hiding this comment

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

I could move the logic from the other workflow to this one to avoid that if desired.

Copy link
Member

Choose a reason for hiding this comment

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

we could also look at the output of git diff here - but I'm not sure what's best

Copy link
Member

@zeitlinger zeitlinger left a comment

Choose a reason for hiding this comment

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

great!

fi

- name: Publish release
if: steps.get-changes.outputs.has-changes == 'true'
Copy link
Member

Choose a reason for hiding this comment

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

we could also look at the output of git diff here - but I'm not sure what's best

@martincostello martincostello marked this pull request as ready for review December 9, 2025 09:39
Copilot AI review requested due to automatic review settings December 9, 2025 09:39
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds automated release workflows to the repository that trigger releases based on changes to the OpenTelemetry instrumentation version in build.gradle. The automation consists of three coordinated workflows: a scheduled checker that runs weekly, a manual/scheduled publisher that creates releases, and an updated release workflow with improved structure.

Key Changes:

  • Added scheduled-release.yml to automatically check for version changes every Friday and trigger releases
  • Added publish-release.yml to create GitHub releases when the instrumentation version has been updated
  • Refactored release.yml to follow security best practices with job-level permissions and fixed YAML syntax

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.

File Description
.github/workflows/scheduled-release.yml New workflow that runs weekly to detect changes in build.gradle and triggers release publication
.github/workflows/publish-release.yml New workflow that determines the next version from build.gradle, compares it to the latest release, and creates a new release if needed
.github/workflows/release.yml Restructured to use job-level permissions, added concurrency control, and fixed YAML syntax error where uses: was incorrectly placed after with:

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@martincostello martincostello marked this pull request as draft December 9, 2025 10:05
- Fix incorrect variable.
- Update `runs-on`.
- Add `timeout-minutes`.
Test the GitHub app's permissions are set up correctly to generate a GitHub token.
Update for automation changes.
@martincostello
Copy link
Member Author

Markdownlint error will fix itself when the PR is merged.

@martincostello martincostello marked this pull request as ready for review December 15, 2025 14:11
Copy link
Member

@zeitlinger zeitlinger left a comment

Choose a reason for hiding this comment

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

thanks a lot 😄

@martincostello martincostello merged commit 78623f0 into main Dec 16, 2025
30 of 31 checks passed
@martincostello martincostello deleted the automated-releases branch December 16, 2025 17:48
@jaydeluca
Copy link
Member

thanks @martincostello !

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

Labels

enhancement New feature or request github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants