-
Notifications
You must be signed in to change notification settings - Fork 107
ci(release): Switch from action-prepare-release to Craft #5527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
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_library.yml to Craft reusable workflow
64b9e3e to
1736a75
Compare
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛
Build / dependencies / internal 🔧
🤖 This preview updates automatically when you update the PR. |
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.
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.
| name: Changelog Preview | ||
| on: | ||
| pull_request: | ||
| types: | ||
| - opened | ||
| - synchronize | ||
| - reopened | ||
| - edited | ||
| - labeled | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| changelog-preview: | ||
| uses: getsentry/craft/.github/workflows/changelog-preview.yml@v2 | ||
| secrets: inherit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we want this, also it does not use the changelog.md we actually curate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this only makes sense if you are using automated changelogs. Happy to remove but I also recommend giving automated changelogs a shot. It allows curation too: https://getsentry.github.io/craft/configuration/#custom-changelog-entries-from-pr-descriptions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am interested about the automated snapshots, but I'd like to review/look into that separately. From your presentation it sounds like the automated changelogs can possibly do what we're interested in now, but we still have a few workflows tied to the manual process.
.github/workflows/release_binary.yml
Outdated
| with: | ||
| version: ${{ github.event.inputs.version }} | ||
| force: ${{ github.event.inputs.force }} | ||
| version: ${{ inputs.version }} | ||
| force: ${{ inputs.force }} | ||
| calver: true |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Dav1dde do we still have calver + semver in Relay
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calver for self-hosted and binary releases, semver for (Python) library releases
| - name: Prepare release | ||
| uses: getsentry/craft@1c58bfd57bfd6a967b6f3fc92bead2c42ee698ce # v2 | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.token.outputs.token }} | ||
| with: | ||
| version: ${{ inputs.version }} | ||
| force: ${{ inputs.force }} | ||
| path: py |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
.github/workflows/release_binary.yml
Outdated
| uses: getsentry/craft@1c58bfd57bfd6a967b6f3fc92bead2c42ee698ce # v2 | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.token.outputs.token }} | ||
| with: | ||
| version: ${{ github.event.inputs.version }} | ||
| force: ${{ github.event.inputs.force }} | ||
| version: ${{ inputs.version }} | ||
| force: ${{ inputs.force }} | ||
| calver: true |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
| - name: Prepare release | ||
| uses: getsentry/craft@1c58bfd57bfd6a967b6f3fc92bead2c42ee698ce # v2 | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.token.outputs.token }} | ||
| with: | ||
| version: ${{ inputs.version }} | ||
| force: ${{ inputs.force }} | ||
| path: py |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
| - /^relay-Windows-x86_64-pdb.zip$/ | ||
| - /^relay-Windows-x86_64\.exe$/ | ||
| versioning: | ||
| policy: calver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Global calver policy incorrectly applies to semver library releases
Medium Severity
The global versioning.policy: calver setting in .craft.yml applies to all releases, but the Python library releases (via release_library.yml with path: py) require semver versioning according to the PR discussion. The library release workflow has no mechanism to override this global calver policy, potentially causing version validation issues or incorrect version handling for Python library releases.
Summary
This PR migrates from the deprecated
action-prepare-releaseto the new Craft GitHub Actions.Changes
.github/workflows/release_binary.ymlto Craft reusable workflow.craft.ymlwithversioning.policy: calverDocumentation
See https://getsentry.github.io/craft/github-actions/ for more information.