Skip to content

Commit

Permalink
Adding create_release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Guretzki committed Jan 29, 2025
1 parent 319e75f commit 840ee1b
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/create_release.yml
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 }}"

0 comments on commit 840ee1b

Please sign in to comment.