Skip to content

Commit 124c05e

Browse files
authored
Merge pull request #3510 from AlchemyCMS/add-release-workflows
Add reusable release workflows
2 parents c7e6dca + b387634 commit 124c05e

File tree

3 files changed

+67
-0
lines changed

3 files changed

+67
-0
lines changed

.github/workflows/post-release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Post Release
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Publish Release"]
6+
types:
7+
- completed
8+
9+
jobs:
10+
bump-dev-version:
11+
if: github.event.workflow_run.conclusion == 'success'
12+
uses: AlchemyCMS/.github/.github/workflows/post-release.yml@main
13+
with:
14+
version_file_path: lib/alchemy/version.rb
15+
target_branch: ${{ github.event.workflow_run.head_branch }}
16+
secrets:
17+
app_id: ${{ vars.ALCHEMY_BOT_APP_ID }}
18+
app_private_key: ${{ secrets.ALCHEMY_BOT_APP_PRIVATE_KEY }}
19+
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
20+
mastodon_access_token: ${{ secrets.MASTODON_ACCESS_TOKEN }}
21+
mastodon_instance: ${{ secrets.MASTODON_INSTANCE }}
22+
bluesky_identifier: ${{ secrets.BLUESKY_IDENTIFIER }}
23+
bluesky_password: ${{ secrets.BLUESKY_PASSWORD }}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Prepare Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
bump:
7+
description: 'Version bump type. Choose "release" for finalizing a pre-release, or patch/minor/major to bump version.'
8+
required: true
9+
type: choice
10+
default: 'patch'
11+
options:
12+
- release
13+
- patch
14+
- minor
15+
- major
16+
17+
jobs:
18+
prepare:
19+
uses: AlchemyCMS/.github/.github/workflows/prepare-release.yml@main
20+
with:
21+
version_file_path: lib/alchemy/version.rb
22+
bump: ${{ inputs.bump }}
23+
secrets:
24+
app_id: ${{ vars.ALCHEMY_BOT_APP_ID }}
25+
app_private_key: ${{ secrets.ALCHEMY_BOT_APP_PRIVATE_KEY }}

.github/workflows/release.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Publish Release
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
types: [closed]
7+
branches:
8+
- main
9+
- '*-stable'
10+
11+
jobs:
12+
publish:
13+
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/v'))
14+
uses: AlchemyCMS/.github/.github/workflows/release.yml@main
15+
with:
16+
version_file_path: lib/alchemy/version.rb
17+
secrets:
18+
app_id: ${{ vars.ALCHEMY_BOT_APP_ID }}
19+
app_private_key: ${{ secrets.ALCHEMY_BOT_APP_PRIVATE_KEY }}

0 commit comments

Comments
 (0)