Skip to content

Commit 699e881

Browse files
authored
ci(release): Switch from action-prepare-release to Craft (#7631)
## 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 - Updated `.craft.yml` with `versioning.policy: calver` ## Documentation See https://getsentry.github.io/craft/github-actions/ for more information.
1 parent c7831ae commit 699e881

File tree

2 files changed

+21
-15
lines changed

2 files changed

+21
-15
lines changed

.craft.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,19 @@ statusProvider:
66
name: github
77
config:
88
contexts:
9-
- 'build-amd64'
10-
- 'build-arm64'
11-
- 'assemble'
9+
- 'build-amd64'
10+
- 'build-arm64'
11+
- 'assemble'
1212
targets:
13-
- id: release
14-
name: docker
15-
source: ghcr.io/getsentry/snuba
16-
target: getsentry/snuba
17-
- id: latest
18-
name: docker
19-
source: ghcr.io/getsentry/snuba
20-
target: getsentry/snuba
21-
targetFormat: '{{{target}}}:latest'
22-
- name: github
13+
- id: release
14+
name: docker
15+
source: ghcr.io/getsentry/snuba
16+
target: getsentry/snuba
17+
- id: latest
18+
name: docker
19+
source: ghcr.io/getsentry/snuba
20+
target: getsentry/snuba
21+
targetFormat: '{{{target}}}:latest'
22+
- name: github
23+
versioning:
24+
policy: calver

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
workflow_dispatch:
44
inputs:
55
version:
6-
description: Version to release (optional)
6+
description: Version to release (or "auto")
77
required: false
88
force:
99
description: Force a release even when there are release-blockers (optional)
@@ -12,6 +12,10 @@ on:
1212
# We want the release to be at 9-10am Pacific Time
1313
# We also want it to be 1 hour before the on-prem release
1414
- cron: "0 17 15 * *"
15+
permissions:
16+
contents: write
17+
pull-requests: write
18+
1519
jobs:
1620
release:
1721
runs-on: ubuntu-latest
@@ -28,7 +32,7 @@ jobs:
2832
token: ${{ steps.token.outputs.token }}
2933
fetch-depth: 0
3034
- name: Prepare release
31-
uses: getsentry/action-prepare-release@v1
35+
uses: getsentry/craft@v2
3236
env:
3337
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
3438
with:

0 commit comments

Comments
 (0)