Skip to content

Commit 881a0a0

Browse files
committed
Use reusable release workflows from AlchemyCMS org
The workflows simply call the reusable workflows with the gem-specific `version_file_path` configuration.
1 parent 0f6ccc1 commit 881a0a0

File tree

3 files changed

+60
-0
lines changed

3 files changed

+60
-0
lines changed

.github/workflows/post-release.yml

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

0 commit comments

Comments
 (0)