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.

BYK added 2 commits January 9, 2026 18:00
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
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.
Comment on lines 35 to 36
version: ${{ inputs.version }}
force: ${{ inputs.force }}

This comment was marked as outdated.

env:
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
with:
version: ${{ github.event.inputs.version }}

This comment was marked as outdated.

description: Version to release
required: true
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.

Missing default value for optional version input

Medium Severity

The version input was changed from required: true to required: false and the description mentions "(or "auto")", but no default value is specified. When users trigger the workflow without providing a version, github.event.inputs.version resolves to an empty string rather than "auto". This empty string gets passed to the getsentry/craft action, which may cause unexpected behavior or failure if the action doesn't treat empty strings as "auto".

Fix in Cursor Fix in Web

@github-actions
Copy link

github-actions bot commented Jan 13, 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).


New Features ✨

  • Refactor log serialization to match docs by giortzisg in #1169
  • Add propagateTraceparent option by giortzisg in #1161
  • Http client integration by aldy505 in #876

Build / dependencies / internal 🔧

Deps

  • Bump actions/create-github-app-token from 2.1.4 to 2.2.1 by dependabot in #1164
  • Bump golangci/golangci-lint-action from 8.0.0 to 9.2.0 by dependabot in #1165
  • Bump codecov/codecov-action from 5.5.1 to 5.5.2 by dependabot in #1163
  • Bump actions/checkout from 5 to 6 by dependabot in #1162
  • Bump actions/cache from 4 to 5 by dependabot in #1166
  • Bump github.com/sirupsen/logrus from 1.9.0 to 1.9.3 in /iris by dependabot in #1152

Other

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

🤖 This preview updates automatically when you update the PR.

Comment on lines 5 to +7
version:
description: Version to release
required: true
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 version input in the release workflow is optional but lacks a default: 'auto'. When omitted, it passes an empty string, not 'auto', causing the workflow to fail.
Severity: CRITICAL

Suggested Fix

In .github/workflows/release.yml, add default: "auto" to the version input definition to ensure that the Craft action receives the correct value when no version is manually specified.

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#L5-L7

Potential issue: The `release.yml` workflow defines the `version` input as optional
(`required: false`) to allow for an 'auto' mode, but it lacks a `default` value. When a
user triggers the workflow without providing a version, GitHub Actions passes an empty
string `""` to `github.event.inputs.version`. The workflow then passes this empty string
to the Craft action. The Craft action expects a specific version or the literal string
`'auto'`, not an empty string, which will likely cause the release workflow to fail when
the user intends to use the auto-versioning feature.

Did we get this right? 👍 / 👎 to inform future reviews.

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.

2 participants