-
-
Notifications
You must be signed in to change notification settings - Fork 200
61 lines (60 loc) · 2.45 KB
/
release-sponsor-kali-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
58
59
60
61
name: Sponsors & Kali - Create Release Branch
on:
workflow_dispatch:
# TODO: Since we don't need to set a starkiller version, we could maybe auto-trigger this workflow.
jobs:
create_sponsors:
if: ${{ github.repository == 'BC-Security/Starkiller-Sponsors' }}
runs-on: ubuntu-latest
steps:
- name: Set env vars
run: |
echo "TARGET_BRANCH=sponsors-main" >> $GITHUB_ENV
- name: Check out code
uses: actions/checkout@v4
with:
ref: sponsors-main
fetch-depth: 0
token: ${{ secrets.RELEASE_TOKEN }}
- name: Initialize mandatory git config
run: |
git config user.name "GitHub Actions"
git config user.email noreply@github.com
- 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: Update Sponsors Changelog
uses: vinnybod/keep-a-changelog-new-release@1.4.0
with:
tag: v${{ env.APP_VERSION }}
changelogPath: CHANGELOG-SPONSORS.md
skipDiff: false
- name: Commit changelog and manifest files
id: make-commit
run: |
git add -A
git commit --message "Prepare release ${{ env.APP_VERSION }} sponsors"
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Get release branch name
run: |
echo "RELEASE_BRANCH=release/$APP_VERSION-sponsors" >> $GITHUB_ENV
- name: Create release branch
run: git checkout -b ${{ env.RELEASE_BRANCH }}
- name: Push new branch
run: git push origin ${{ env.RELEASE_BRANCH }}
- name: Create pull request into ${{ env.TARGET_BRANCH }}
uses: thomaseizinger/create-pull-request@1.4.0
with:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
head: ${{ env.RELEASE_BRANCH }}
base: ${{ env.TARGET_BRANCH }}
title: v${{ env.APP_VERSION }} into ${{ env.TARGET_BRANCH }}
reviewers: ${{ github.event.issue.user.login }}
body: |
This PR was automatically generated by the `release-sponsor-kali-start` workflow.
I've updated the version name and code commit: ${{ steps.make-commit.outputs.commit }}.
This PR should be merged with a merge commit, **not a squash commit.**
Merging this PR will trigger a tag and release automatically.