-
-
Notifications
You must be signed in to change notification settings - Fork 196
57 lines (56 loc) · 2.06 KB
/
release-public-start.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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@v4
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@v4
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.