-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alex Guretzki
committed
Jan 29, 2025
1 parent
319e75f
commit 840ee1b
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Pull Request Merge | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
branches: | ||
- 'release/*' | ||
|
||
jobs: | ||
create_release: | ||
if: github.event.pull_request.merged == true | ||
name: "Create Release" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checking out the current branch | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Getting the description for the pull request that was merged | ||
- name: Fetch Pull Request Description | ||
run: | | ||
PR_NUMBER=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") | ||
PR_DESCRIPTION=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
https://api.github.com/repos/${{ github.repository }}/pulls/${PR_NUMBER} | jq --raw-output .body) | ||
echo "PR_DESCRIPTION=$PR_DESCRIPTION" >> $GITHUB_ENV | ||
- name: Create Release | ||
run: | | ||
echo "Creating Release for Version: XXX" | ||
echo "Description: ${{ env.PR_DESCRIPTION }}" |