-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ci(release): Switch from action-prepare-release to Craft #18763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from 3 commits
b9ae430
3c240d2
f101fbf
a8c5f38
95d4e72
f88812d
d17ff7e
a902463
5348f80
e912696
480fe95
91807f2
fbb531f
b4ba2d3
e07b23e
c15b599
e26bc72
df2832a
657b2e0
64e73aa
0b2d1e4
6855820
0ad41f4
ec4ad57
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,60 +1,37 @@ | ||
| name: 'Gitflow: Auto prepare release' | ||
| on: | ||
| pull_request: | ||
| types: | ||
| - closed | ||
| branches: | ||
| - master | ||
|
|
||
| # This workflow tirggers a release when merging a branch with the pattern `prepare-release/VERSION` into master. | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: Version to release (or "auto") | ||
| required: false | ||
| force: | ||
| description: Force a release even when there are release-blockers | ||
| required: false | ||
| merge_target: | ||
| description: Target branch to merge into | ||
| required: false | ||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-24.04 | ||
| name: 'Prepare a new version' | ||
|
|
||
| runs-on: ubuntu-latest | ||
| name: Release a new version | ||
| steps: | ||
| - name: Get auth token | ||
| id: token | ||
| uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1 | ||
| with: | ||
| app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }} | ||
| private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} | ||
|
|
||
| - uses: actions/checkout@v6 | ||
| with: | ||
| token: ${{ steps.token.outputs.token }} | ||
| fetch-depth: 0 | ||
|
|
||
| # https://github.com/actions-ecosystem/action-regex-match | ||
| - uses: actions-ecosystem/action-regex-match@v2 | ||
| id: version-regex | ||
| with: | ||
| # Parse version from head branch | ||
| text: ${{ github.head_ref }} | ||
| # match: preprare-release/xx.xx.xx | ||
| regex: '^prepare-release\/(\d+\.\d+\.\d+)(?:-(alpha|beta|rc)\.\d+)?$' | ||
|
|
||
| - name: Extract version | ||
| id: get_version | ||
| run: | | ||
| version=${{ steps.version-regex.outputs.match }} | ||
| version=${version/'prepare-release/'/''} | ||
| echo "version=$version" >> $GITHUB_OUTPUT | ||
| - name: Set up Node | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version-file: 'package.json' | ||
|
|
||
| - name: Prepare release | ||
| uses: getsentry/action-prepare-release@v1 | ||
| if: | ||
| github.event.pull_request.merged == true && steps.version-regex.outputs.match != '' && | ||
| steps.get_version.outputs.version != '' | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.token.outputs.token }} | ||
| with: | ||
| version: ${{ steps.get_version.outputs.version }} | ||
| force: false | ||
| merge_target: master | ||
| craft_config_from_merge_target: true | ||
| - name: Get auth token | ||
| id: token | ||
| uses: actions/create-github-app-token@v1 | ||
| with: | ||
| app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }} | ||
| private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| token: ${{ steps.token.outputs.token }} | ||
| fetch-depth: 0 | ||
| - name: Prepare release | ||
| uses: getsentry/craft@v2 | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.token.outputs.token }} | ||
| with: | ||
| version: ${{ inputs.version }} | ||
| force: ${{ inputs.force }} | ||
| merge_target: ${{ inputs.merge_target }} | ||
| craft_config_from_merge_target: 'true' | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| name: Changelog Preview | ||
| on: | ||
| pull_request: | ||
| types: | ||
| - opened | ||
| - synchronize | ||
| - reopened | ||
| - edited | ||
| - labeled | ||
| jobs: | ||
| changelog-preview: | ||
| uses: getsentry/craft/.github/workflows/changelog-preview.yml@v2 | ||
| secrets: inherit |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,40 +3,35 @@ on: | |
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: Version to release | ||
| required: true | ||
| description: Version to release (or "auto") | ||
| required: false | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Optional version input lacks default valueLow Severity The |
||
| force: | ||
| description: Force a release even when there are release-blockers (optional) | ||
| description: Force a release even when there are release-blockers | ||
| required: false | ||
| merge_target: | ||
| description: Target branch to merge into. Uses the default branch as a fallback (optional) | ||
| description: Target branch to merge into | ||
cursor[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| required: false | ||
| default: master | ||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-24.04 | ||
| name: 'Release a new version' | ||
| runs-on: ubuntu-latest | ||
|
||
| name: Release a new version | ||
| steps: | ||
| - name: Get auth token | ||
| id: token | ||
| uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1 | ||
| with: | ||
| app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }} | ||
| private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| token: ${{ steps.token.outputs.token }} | ||
| fetch-depth: 0 | ||
| - name: Set up Node | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version-file: 'package.json' | ||
| - name: Prepare release | ||
| uses: getsentry/action-prepare-release@v1 | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.token.outputs.token }} | ||
| with: | ||
| version: ${{ github.event.inputs.version }} | ||
| force: ${{ github.event.inputs.force }} | ||
| merge_target: ${{ github.event.inputs.merge_target }} | ||
| craft_config_from_merge_target: true | ||
| - name: Get auth token | ||
| id: token | ||
| uses: actions/create-github-app-token@v1 | ||
| with: | ||
| app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }} | ||
| private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| token: ${{ steps.token.outputs.token }} | ||
| fetch-depth: 0 | ||
| - name: Prepare release | ||
| uses: getsentry/craft@v2 | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.token.outputs.token }} | ||
| with: | ||
| version: ${{ inputs.version }} | ||
| force: ${{ inputs.force }} | ||
| merge_target: ${{ inputs.merge_target }} | ||
| craft_config_from_merge_target: 'true' | ||
cursor[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.