Skip to content

Commit 6e95fba

Browse files
vaindclaude
andauthored
ci(release): migrate to Craft reusable workflow (#148)
* ci(release): migrate to Craft reusable workflow Switch from action-prepare-release to the Craft reusable workflow, which is simpler and handles authentication/checkout internally. - Version input is now optional, defaults to 'auto' (inferred from commits) - Uses secrets: inherit to pass required credentials See https://craft.sentry.dev/github-actions/ for documentation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * chore: bump craft minVersion to 2.20.1 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: add empty permissions block to satisfy CodeQL Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 4cf47d5 commit 6e95fba

File tree

2 files changed

+9
-26
lines changed

2 files changed

+9
-26
lines changed

.craft.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
minVersion: 0.23.1
1+
minVersion: 2.20.1
22
changelogPolicy: auto
33
preReleaseCommand: pwsh -cwa ''
44
artifactProvider:

.github/workflows/release.yml

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,22 @@
11
name: Release
22

33
permissions:
4-
contents: read
4+
contents: write
55

66
on:
77
workflow_dispatch:
88
inputs:
99
version:
10-
description: Version to release
11-
required: true
10+
description: 'Version to release (automatically inferred form commits if not provided)'
11+
required: false
1212
force:
1313
description: Force a release even when there are release-blockers (optional)
1414
required: false
1515

1616
jobs:
1717
release:
18-
runs-on: ubuntu-latest
19-
name: "Release a new version"
20-
steps:
21-
- name: Get auth token
22-
id: token
23-
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
24-
with:
25-
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
26-
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
27-
28-
- uses: actions/checkout@v4
29-
with:
30-
token: ${{ steps.token.outputs.token }}
31-
fetch-depth: 0
32-
33-
- name: Prepare release
34-
uses: getsentry/action-prepare-release@v1
35-
env:
36-
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
37-
with:
38-
version: ${{ github.event.inputs.version }}
39-
force: ${{ github.event.inputs.force }}
18+
uses: getsentry/craft/.github/workflows/release.yml@v2
19+
with:
20+
version: ${{ inputs.version || 'auto' }}
21+
force: ${{ inputs.force || 'false' }}
22+
secrets: inherit

0 commit comments

Comments
 (0)