Conversation
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.
| fi | ||
|
|
||
| - name: Publish release | ||
| if: steps.get-changes.outputs.has-changes == 'true' |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I could move the logic from the other workflow to this one to avoid that if desired.
There was a problem hiding this comment.
we could also look at the output of git diff here - but I'm not sure what's best
| fi | ||
|
|
||
| - name: Publish release | ||
| if: steps.get-changes.outputs.has-changes == 'true' |
There was a problem hiding this comment.
we could also look at the output of git diff here - but I'm not sure what's best
There was a problem hiding this comment.
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.ymlto automatically check for version changes every Friday and trigger releases - Added
publish-release.ymlto create GitHub releases when the instrumentation version has been updated - Refactored
release.ymlto 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.
- Fix incorrect variable. - Update `runs-on`. - Add `timeout-minutes`.
Test the GitHub app's permissions are set up correctly to generate a GitHub token.
Reverts 5bc3e78.
Update for automation changes.
|
Markdownlint error will fix itself when the PR is merged. |
|
thanks @martincostello ! |
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:
grafana-opentelemetry-java/build.gradle
Line 6 in fd221d1
Any other changes will not trigger a release.
Based on the implementation from the following PRs:
TODO
Add secrets to VaultUpdate GitHub token broker configurationVerify generating GitHub tokensTestUpdateRELEASING.md