Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROX-19692: Add a release preparation workflow. #1284

Merged
merged 1 commit into from
Sep 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/start-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Start release
on:
workflow_dispatch:
inputs:
commit:
description: 'Commit to merge into the stage branch (branch name, tag name or SHA)'
required: true
default: 'main'
type: string
release_version:
description: 'Release version in the format YYYY-MM-DD.N'
required: true
default: 'YYYY-MM-DD.1'
type: string

jobs:
prepare-stage-pr:
runs-on: ubuntu-latest
name: Prepare stage PR
steps:

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

# action-create-branch does not accept symbolic refs, so we need to parse it here.
- name: Canonicalize the commit ID
run: |
echo "commit_hash=$(git rev-parse --verify --quiet 'remotes/origin/${{ inputs.commit }}' || git rev-parse --verify --quiet '${{ inputs.commit }}')" >> "$GITHUB_ENV"

- name: Create Release Candidate branch
uses: peterjgrainger/[email protected]
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
branch: 'rc-${{ inputs.release_version }}'
sha: '${{ env.commit_hash }}'

- name: Open a pull request
uses: tretuna/[email protected]
with:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
FROM_BRANCH: 'rc-${{ inputs.release_version }}'
TO_BRANCH: 'stage'