2022-06-14 16:27:59 +00:00
|
|
|
name: 'Create Release Pull Request'
|
|
|
|
|
2022-06-17 11:49:36 +00:00
|
|
|
on: create
|
2022-06-14 16:27:59 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Create Release Pull Request
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
pull-requests: write
|
|
|
|
steps:
|
2023-09-04 15:50:24 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-06-17 11:49:36 +00:00
|
|
|
if: |
|
|
|
|
startsWith(github.ref, 'refs/heads/releases/') && !contains(github.ref, 'test')
|
2022-06-14 16:27:59 +00:00
|
|
|
|
|
|
|
- name: Create Pull Request content
|
2022-06-17 11:49:36 +00:00
|
|
|
if: |
|
|
|
|
startsWith(github.ref, 'refs/heads/releases/') && !contains(github.ref, 'test')
|
2022-06-14 16:27:59 +00:00
|
|
|
run: |
|
|
|
|
PR_TITLE=`./script/draft-release/release-pr-content.sh title ${GITHUB_REF#refs/heads/}`
|
|
|
|
PR_BODY=`./script/draft-release/release-pr-content.sh body ${GITHUB_REF#refs/heads/}`
|
|
|
|
|
|
|
|
echo "PR_BODY<<EOF" >> $GITHUB_ENV
|
|
|
|
echo "$PR_BODY" >> $GITHUB_ENV
|
|
|
|
echo "EOF" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
echo "PR_TITLE<<EOF" >> $GITHUB_ENV
|
|
|
|
echo "$PR_TITLE" >> $GITHUB_ENV
|
|
|
|
echo "EOF" >> $GITHUB_ENV
|
|
|
|
|
2023-09-11 15:30:30 +00:00
|
|
|
- uses: tibdex/github-app-token@v2
|
2022-06-14 16:27:59 +00:00
|
|
|
id: generate-token
|
2022-06-17 11:49:36 +00:00
|
|
|
if: |
|
|
|
|
startsWith(github.ref, 'refs/heads/releases/') && !contains(github.ref, 'test')
|
2022-06-14 16:27:59 +00:00
|
|
|
with:
|
|
|
|
app_id: ${{ secrets.DESKTOP_RELEASES_APP_ID }}
|
|
|
|
private_key: ${{ secrets.DESKTOP_RELEASES_APP_PRIVATE_KEY }}
|
|
|
|
|
|
|
|
- name: Create Release Pull Request
|
2023-06-19 15:59:06 +00:00
|
|
|
uses: peter-evans/create-pull-request@v5.0.2
|
2022-06-17 11:49:36 +00:00
|
|
|
if: |
|
|
|
|
startsWith(github.ref, 'refs/heads/releases/') && !contains(github.ref, 'test')
|
2022-06-14 16:27:59 +00:00
|
|
|
with:
|
|
|
|
token: ${{ steps.generate-token.outputs.token }}
|
|
|
|
title: ${{ env.PR_TITLE }}
|
|
|
|
body: ${{ env.PR_BODY }}
|
|
|
|
branch: ${{ github.ref }}
|
|
|
|
base: development
|
2022-06-15 14:09:23 +00:00
|
|
|
draft: true
|