From a3664c92437dd6ca4ba8dcd60e22f689e9840830 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Wed, 10 Dec 2025 10:50:34 +0100 Subject: [PATCH 1/2] Add reusable release workflows --- .github/workflows/post-release.yml | 17 +++++++++++++++++ .github/workflows/prepare-release.yml | 25 +++++++++++++++++++++++++ .github/workflows/release.yml | 18 ++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 .github/workflows/post-release.yml create mode 100644 .github/workflows/prepare-release.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml new file mode 100644 index 0000000..5b4ab32 --- /dev/null +++ b/.github/workflows/post-release.yml @@ -0,0 +1,17 @@ +name: Post Release + +on: + workflow_run: + workflows: ["Publish Release"] + types: + - completed + +jobs: + bump-dev-version: + if: github.event.workflow_run.conclusion == 'success' + uses: AlchemyCMS/.github/.github/workflows/post-release.yml@main + with: + version_file_path: lib/alchemy/sentry/version.rb + secrets: + app_id: ${{ vars.ALCHEMY_BOT_APP_ID }} + app_private_key: ${{ secrets.ALCHEMY_BOT_APP_PRIVATE_KEY }} diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml new file mode 100644 index 0000000..50e1833 --- /dev/null +++ b/.github/workflows/prepare-release.yml @@ -0,0 +1,25 @@ +name: Prepare Release + +on: + workflow_dispatch: + inputs: + bump: + description: 'Version bump type. Choose "release" for finalizing a pre-release, or patch/minor/major to bump version.' + required: true + type: choice + default: 'patch' + options: + - release + - patch + - minor + - major + +jobs: + prepare: + uses: AlchemyCMS/.github/.github/workflows/prepare-release.yml@main + with: + version_file_path: lib/alchemy/sentry/version.rb + bump: ${{ inputs.bump }} + secrets: + app_id: ${{ vars.ALCHEMY_BOT_APP_ID }} + app_private_key: ${{ secrets.ALCHEMY_BOT_APP_PRIVATE_KEY }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1307a82 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,18 @@ +name: Publish Release + +on: + workflow_dispatch: + pull_request: + types: [closed] + branches: + - main + +jobs: + publish: + if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/v')) + uses: AlchemyCMS/.github/.github/workflows/release.yml@main + with: + version_file_path: lib/alchemy/sentry/version.rb + secrets: + app_id: ${{ vars.ALCHEMY_BOT_APP_ID }} + app_private_key: ${{ secrets.ALCHEMY_BOT_APP_PRIVATE_KEY }} From e2ddcf35f009652a7c46938b0783fea4ca06558d Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Wed, 10 Dec 2025 12:41:56 +0100 Subject: [PATCH 2/2] Add announcement secrets to post-release workflow --- .github/workflows/post-release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml index 5b4ab32..815966a 100644 --- a/.github/workflows/post-release.yml +++ b/.github/workflows/post-release.yml @@ -15,3 +15,8 @@ jobs: secrets: app_id: ${{ vars.ALCHEMY_BOT_APP_ID }} app_private_key: ${{ secrets.ALCHEMY_BOT_APP_PRIVATE_KEY }} + slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} + mastodon_access_token: ${{ secrets.MASTODON_ACCESS_TOKEN }} + mastodon_instance: ${{ secrets.MASTODON_INSTANCE }} + bluesky_identifier: ${{ secrets.BLUESKY_IDENTIFIER }} + bluesky_password: ${{ secrets.BLUESKY_PASSWORD }}