Skip to content

Add "create release PR" github action #4236

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

Merged
merged 1 commit into from
Oct 24, 2022
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
49 changes: 49 additions & 0 deletions .github/workflows/create_releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Create release

on:
workflow_dispatch:
inputs:
name:
description: 'Release name'
required: true
type: string

jobs:
create-branches:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Create base branch
uses: peterjgrainger/[email protected]
with:
branch: '${{ inputs.name }}'
- name: Create release branch
uses: peterjgrainger/[email protected]
with:
branch: '${{ inputs.name }}.release'

create-pull-request:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Create release configuration template
run: |
git config user.name 'Create Release GA'
git config user.email '[email protected]'
echo "[release]" > release.cfg
echo "name = ${{ inputs.name }}" >> release.cfg
echo "mode = RELEASE" >> release.cfg
echo "" >> release.cfg
echo "[modules]" >> release.cfg
echo "" >> release.cfg
git add release.cfg
git commit -a -m 'Create release config'

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
base: '${{ inputs.name }}'
branch: '${{ inputs.name }}.release'
title: '${{ inputs.name}} release'