Repository navigation
fix: trigger release build after release-please creates tag - #40
Conversation
Fixes rtk-ai#27 Tags created by GITHUB_TOKEN don't trigger other workflows. This change makes release-please call release.yml directly via workflow_call after creating a release. Changes: - release.yml: Add workflow_call trigger with tag input - release.yml: Handle workflow_call in version detection - release.yml: Upload assets for workflow_call events - release-please.yml: Add build-release job that calls release.yml - release-please.yml: update-latest-tag now waits for build to complete This approach: - Requires no PAT/secrets - Keeps workflows separate and maintainable - Uses workflow_call (cleaner than workflow_dispatch) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes issue #27 where tags created by release-please don't trigger the release build pipeline. The solution uses workflow_call to directly invoke release.yml from release-please.yml after a release is created, avoiding the limitation that tags created by GITHUB_TOKEN don't trigger other workflows.
Changes:
- Added
workflow_calltrigger torelease.ymlwith tag input parameter - Updated version detection logic to handle
workflow_callevents - Modified asset upload condition to include
workflow_callevents - Added
build-releasejob inrelease-please.ymlthat callsrelease.yml - Updated
update-latest-tagjob to wait for build completion
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/release.yml | Added workflow_call trigger with tag input, updated version detection logic to handle workflow_call events, and modified asset upload condition to support workflow_call |
| .github/workflows/release-please.yml | Added build-release job that calls release.yml via workflow_call, and updated update-latest-tag to depend on build completion |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| workflow_call: | ||
| inputs: | ||
| tag: | ||
| description: 'Tag to release' | ||
| required: true | ||
| type: string |
There was a problem hiding this comment.
The workflow_call trigger is defined correctly, but the implementation is incomplete. When this workflow is called via workflow_call, the checkout actions throughout the workflow (at lines 54, 96, 119, and 146) will default to checking out the branch that triggered the caller workflow (master), not the tag that was just created.
All checkout actions need to add a ref parameter that uses the tag input when workflow_call is the event type. For example:
- name: Checkout
uses: actions/checkout@v4
with:
ref: refs/tags/${{ inputs.tag }}Note: You'll need to make the ref conditional based on the event type, or use a default that works for all cases.
…w-trigger fix: trigger release build after release-please creates tag
Summary
Fixes #27
Tags created by
GITHUB_TOKENdon't trigger other workflows. This PR makesrelease-please.ymlcallrelease.ymldirectly viaworkflow_callafter creating a release.Changes
release.ymlworkflow_calltrigger withtaginputworkflow_callin version detection logicreleaseandworkflow_calleventsrelease-please.ymlbuild-releasejob that callsrelease.ymlwith the tagupdate-latest-tagnow waits for build to complete before updatingWhy this approach?
Flow after this PR
Test Plan
release.ymlis triggered viaworkflow_calllatesttag is updated after build completes🤖 Generated with Claude Code