Skip to content

Commit 25e8763

Browse files
authored
chore: add minimal Craft release tooling configuration (#101)
* chore: add minimal Craft release tooling configuration - Add .craft.yml with minimal configuration for GitHub-only releases - Add release workflow with required version input - Uses no-op preReleaseCommand since no version tracking needed - Enables automated release management via craft * fix: add explicit permissions to release workflow Adds 'permissions: contents: read' to limit GITHUB_TOKEN permissions following security best practices. The workflow uses a GitHub App token for privileged operations, so limiting the default token to read-only is appropriate.
1 parent 0ee6d58 commit 25e8763

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

.craft.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
minVersion: 0.23.1
2+
changelogPolicy: auto
3+
preReleaseCommand: pwsh -c ''
4+
targets:
5+
- name: github

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
workflow_dispatch:
8+
inputs:
9+
version:
10+
description: Version to release
11+
required: true
12+
force:
13+
description: Force a release even when there are release-blockers (optional)
14+
required: false
15+
16+
jobs:
17+
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 }}

0 commit comments

Comments
 (0)