Skip to content

Commit a514c1f

Browse files
committed
chore(CI): Add release workflows
Signed-off-by: Thomas von Deyen <thomas@vondeyen.com>
1 parent fbd31f9 commit a514c1f

3 files changed

Lines changed: 73 additions & 0 deletions

File tree

.github/workflows/post-release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Post Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
target_branch:
7+
description: 'Target branch (e.g., main, 8.0-stable)'
8+
required: true
9+
default: 'main'
10+
type: string
11+
repository_dispatch:
12+
types: [post-release]
13+
14+
jobs:
15+
post-release:
16+
uses: AlchemyCMS/.github/.github/workflows/post-release.yml@main
17+
with:
18+
version_file_path: lib/alchemy/devise/version.rb
19+
target_branch: ${{ github.event.client_payload.target_branch || inputs.target_branch }}
20+
secrets:
21+
app_id: ${{ vars.ALCHEMY_BOT_APP_ID }}
22+
app_private_key: ${{ secrets.ALCHEMY_BOT_APP_PRIVATE_KEY }}
23+
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
24+
mastodon_access_token: ${{ secrets.MASTODON_ACCESS_TOKEN }}
25+
mastodon_instance: ${{ secrets.MASTODON_INSTANCE }}
26+
bluesky_identifier: ${{ secrets.BLUESKY_IDENTIFIER }}
27+
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 (8.0.0.dev → 8.0.0), or patch/minor/major to simply 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/devise/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: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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/devise/version.rb
17+
target_branch: ${{ github.event.pull_request.base.ref || github.ref_name }}
18+
secrets:
19+
app_id: ${{ vars.ALCHEMY_BOT_APP_ID }}
20+
app_private_key: ${{ secrets.ALCHEMY_BOT_APP_PRIVATE_KEY }}
21+
rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}

0 commit comments

Comments
 (0)