Skip to content

Commit

Permalink
Backport 4.0.x alpha release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelklishin committed Nov 6, 2024
1 parent 1d1ae2f commit f26375e
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release-4.0.x-alphas.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Trigger a 4.0.x alpha release build"
on:
workflow_dispatch:
push:
branches:
- "v4.0.x"
paths:
- "deps/*/src/**"
- 'deps/rabbitmq_management/priv/**'
- ".github/workflows/**"
env:
DEV_WORKFLOW_REPOSITORY: "rabbitmq/server-packages"
jobs:
trigger_alpha_build:
runs-on: ubuntu-latest
steps:
- name: Compute prerelease identifier from commit SHA
run: echo "PRERELEASE_IDENTIFIER=`echo ${{ github.sha }} | cut -c1-8`" >> $GITHUB_ENV
- name: Compute human-readable release timestamp
run: echo "PRERELEASE_TIMESTAMP=`date --rfc-3339=seconds`" >> $GITHUB_ENV
- name: Compute UNIX release timestamp
run: echo "PRERELEASE_UNIX_TIMESTAMP=`date +%s`" >> $GITHUB_ENV
- name: Trigger an alpha release build in ${{ env.DEV_WORKFLOW_REPOSITORY }}
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.RABBITMQCI_BOT_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ env.DEV_WORKFLOW_REPOSITORY }}/dispatches \
-d '{ "event_type": "new_4.0.x_alpha", "client_payload": {"release_repository": "${{ env.DEV_WORKFLOW_REPOSITORY }}", "release_description": "Commit: https://github.com/rabbitmq/rabbitmq-server/commit/${{ github.sha }}, build was triggered at: ${{ env.PRERELEASE_TIMESTAMP }}", "prerelease": true, "prerelease_kind": "alpha", "prerelease_identifier": "${{ env.PRERELEASE_IDENTIFIER }}", "release_title": "RabbitMQ 4.0.4-alpha.${{ env.PRERELEASE_IDENTIFIER }} (${{ env.PRERELEASE_TIMESTAMP }})", "base_version": "4.0.4", "release_timestamp": "${{ env.PRERELEASE_TIMESTAMP }}", "release_unix_timestamp": "${{ env.PRERELEASE_UNIX_TIMESTAMP }}" }}'

0 comments on commit f26375e

Please sign in to comment.