Skip to content

Workflow file for this run

name: Create Release and Auto Merge
on:
push:
tags:
- 'v*.*.*' # ? This will match tags like v2.0.1, v1.2.3, etc.
jobs:
process:
if: github.actor == 'GoodM4ven' # ! Hard-coded username
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Merge PR
run: |
PR_NUMBER=$(gh pr list --base main --state open --author [email protected] --json number --jq '.[0].number')
if [[ ! -z "$PR_NUMBER" ]]; then
gh pr merge $PR_NUMBER --merge
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Extract release notes
run: |
echo "${{ github.event.head_commit.message }}" | sed '1d' > .github/release_body.md
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body_path: .github/release_body.md
draft: false
prerelease: false