Skip to content

Commit 2b62357

Browse files
BYKchargome
andauthored
ci(release): Switch from action-prepare-release to Craft (#18763)
## Summary This PR migrates from the deprecated `action-prepare-release` to the new Craft GitHub Actions. ## Changes - Migrated `.github/workflows/auto-release.yml` to Craft reusable workflow ## Documentation See https://getsentry.github.io/craft/github-actions/ for more information. Closes #18765 (added automatically) --------- Co-authored-by: Charly Gomez <charly.gomez@sentry.io>
1 parent 76e038b commit 2b62357

File tree

4 files changed

+34
-6
lines changed

4 files changed

+34
-6
lines changed

.craft.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
minVersion: '0.23.1'
2-
changelogPolicy: simple
2+
changelog:
3+
policy: simple
34
preReleaseCommand: bash scripts/craft-pre-release.sh
45
targets:
56
# NPM Targets

.github/workflows/auto-release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ on:
66
branches:
77
- master
88

9-
# This workflow tirggers a release when merging a branch with the pattern `prepare-release/VERSION` into master.
9+
# This workflow triggers a release when merging a branch with the pattern `prepare-release/VERSION` into master.
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
1014
jobs:
1115
release:
1216
runs-on: ubuntu-24.04
@@ -47,7 +51,7 @@ jobs:
4751
node-version-file: 'package.json'
4852

4953
- name: Prepare release
50-
uses: getsentry/action-prepare-release@v1
54+
uses: getsentry/craft@013a7b2113c2cac0ff32d5180cfeaefc7c9ce5b6 # v2.24.1
5155
if:
5256
github.event.pull_request.merged == true && steps.version-regex.outputs.match != '' &&
5357
steps.get_version.outputs.version != ''
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@2.24.1
19+
secrets: inherit

.github/workflows/release.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@ on:
33
workflow_dispatch:
44
inputs:
55
version:
6-
description: Version to release
7-
required: true
6+
description: Version to release (or "auto")
7+
required: false
88
force:
99
description: Force a release even when there are release-blockers (optional)
1010
required: false
1111
merge_target:
1212
description: Target branch to merge into. Uses the default branch as a fallback (optional)
1313
required: false
1414
default: master
15+
permissions:
16+
contents: write
17+
pull-requests: write
18+
1519
jobs:
1620
release:
1721
runs-on: ubuntu-24.04
@@ -32,7 +36,7 @@ jobs:
3236
with:
3337
node-version-file: 'package.json'
3438
- name: Prepare release
35-
uses: getsentry/action-prepare-release@v1
39+
uses: getsentry/craft@013a7b2113c2cac0ff32d5180cfeaefc7c9ce5b6 # v2.24.1
3640
env:
3741
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
3842
with:

0 commit comments

Comments
 (0)