Skip to content

Public - Create Release Branch #10

Public - Create Release Branch

Public - Create Release Branch #10

name: Public - Create Release Branch
on:
workflow_dispatch:
inputs:
sponsorTag:
description: 'The tag to merge into master and dev from the sponsors repo. Example: v4.5.2-private'
type: string
required: true
jobs:
create_release:
if: ${{ github.repository == 'BC-Security/Starkiller' }}
runs-on: ubuntu-latest
steps:
- name: Check out sponsor repo
uses: actions/checkout@v3
with:
repository: 'BC-Security/Starkiller-Sponsors'
ref: ${{ inputs.sponsorTag }}
token: ${{ secrets.RELEASE_TOKEN }}
fetch-depth: 0
- name: Add public repo
run: |
git remote add public https://github.com/BC-Security/Starkiller.git
git fetch public
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
- name: Initialize mandatory git config
run: |
git config user.name "GitHub Actions"
git config user.email [email protected]
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Get app version
run: |
echo "APP_VERSION=$(npm pkg get version | sed 's/"//g')" >> $GITHUB_ENV
- name: Get release branch name
run: |
echo "RELEASE_BRANCH=release/$APP_VERSION" >> $GITHUB_ENV
- name: Create release branch
run: |
git checkout -b ${{ env.RELEASE_BRANCH }}
- name: Push new branch
run: git push public ${{ env.RELEASE_BRANCH }}
- name: Create pull request into main
uses: thomaseizinger/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
head: ${{ env.RELEASE_BRANCH }}
base: main
title: v${{ env.APP_VERSION }} into main
reviewers: ${{ github.event.issue.user.login }}
body: |
This PR was automatically generated by the `release-public-start` workflow.
This PR should be merged with a merge commit, **not a squash commit.**
Merging this PR will trigger a tag and release automatically.