Skip to content

Commit 46f9a6c

Browse files
BYKgetsantry[bot]
andauthored
ci(release): Switch from action-prepare-release to Craft (#106005)
## 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. --------- Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
1 parent 16caeef commit 46f9a6c

File tree

3 files changed

+31
-5
lines changed

3 files changed

+31
-5
lines changed

.craft.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
minVersion: '0.23.1'
1+
minVersion: '2.20.0'
22
releaseBranchPrefix: releases
3-
changelog: CHANGES
4-
changelogPolicy: auto
3+
changelog:
4+
filePath: CHANGES
5+
policy: auto
56
statusProvider:
67
name: github
78
config:
@@ -13,3 +14,5 @@ artifactProvider:
1314
name: none
1415
targets:
1516
- name: github
17+
versioning:
18+
policy: calver
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Changelog Preview
2+
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
- synchronize
7+
- reopened
8+
- edited
9+
- labeled
10+
- unlabeled
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
statuses: write
15+
16+
jobs:
17+
changelog-preview:
18+
uses: getsentry/craft/.github/workflows/changelog-preview.yml@v2
19+
secrets: inherit

.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 self-hosted 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@d2cc2db3db92bc5b79a90c316f588f2b13626a2b # v1.5.6
35+
uses: getsentry/craft@beea4aba589c66381258cbd131c5551ae8245b82 # v2
3236
env:
3337
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
3438
with:

0 commit comments

Comments
 (0)