Skip to content

Conversation

@BYK
Copy link
Member

@BYK BYK commented Jan 9, 2026

Summary

This PR migrates from the deprecated action-prepare-release to the new Craft GitHub Actions.

Changes

  • Migrated .github/workflows/release.yml to Craft reusable workflow

Documentation

See https://getsentry.github.io/craft/github-actions/ for more information.

This PR migrates from the deprecated action-prepare-release to the new
Craft GitHub Actions (reusable workflow or composite action).

Changes:
- Migrate .github/workflows/release.yml to Craft reusable workflow
@github-actions
Copy link

github-actions bot commented Jan 9, 2026

The latest Buf updates on your PR. Results from workflow ci / buf-checks (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped✅ passed✅ passedJan 12, 2026, 12:28 PM

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Build / dependencies / internal 🔧

  • (release) Switch from action-prepare-release to Craft by BYK in #161

🤖 This preview updates automatically when you update the PR.

Comment on lines +3 to +9
pull_request:
types:
- opened
- synchronize
- reopened
- edited
- labeled
Copy link
Member

Choose a reason for hiding this comment

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

Don't know why this is needed here. This repository has existing backwards compatibility checks in its CI config.

Copy link
Member Author

Choose a reason for hiding this comment

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

You don't need it. We can remove if you don't think the changelog preview is not useful.

Copy link
Member

Choose a reason for hiding this comment

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

I don't think it is useful. Most folks are doing releases with fewer than 5 changes in them.

The previous migration incorrectly removed the GitHub App token
authentication step. This commit restores it by switching to the
composite action pattern which preserves the auth flow.
@BYK BYK requested a review from markstory January 9, 2026 23:18
Comment on lines +6 to +7
description: Version to release (or "auto")
required: false
Copy link

Choose a reason for hiding this comment

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

Bug: The optional version input defaults to an empty string, not "auto", causing the getsentry/craft action to fail when the version is omitted during manual trigger.
Severity: HIGH

🔍 Detailed Analysis

The release.yml workflow's version input was changed from required to optional, with the description implying a default of "auto". However, when the workflow is triggered without this input, GitHub Actions provides an empty string ("") instead of null. This empty string is passed to the getsentry/craft@v2 action's version parameter. The craft action validates this input and rejects empty strings, causing the workflow to fail at runtime. The workflow is missing logic to convert the empty string input to the expected "auto" value.

💡 Suggested Fix

Modify the workflow to explicitly default the version to "auto" when the inputs.version is an empty string. This can be done by setting a variable before the craft step, for example: VERSION: ${{ inputs.version == '' && 'auto' || inputs.version }}, and then passing $VERSION to the action.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: .github/workflows/release.yml#L6-L7

Potential issue: The `release.yml` workflow's `version` input was changed from required
to optional, with the description implying a default of "auto". However, when the
workflow is triggered without this input, GitHub Actions provides an empty string (`""`)
instead of `null`. This empty string is passed to the `getsentry/craft@v2` action's
`version` parameter. The `craft` action validates this input and rejects empty strings,
causing the workflow to fail at runtime. The workflow is missing logic to convert the
empty string input to the expected "auto" value.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 8427849

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.

3 participants