Skip to content

Commit

Permalink
ci: add PR action
Browse files Browse the repository at this point in the history
  • Loading branch information
TheUnderScorer committed Nov 24, 2023
1 parent 31b0393 commit d7e30a5
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/create-pr-to-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Create PR to Main

on:
release:
types:
- published

permissions:
pull-requests: write
contents: read

jobs:
create-pr-to-main:
runs-on: ubuntu-latest
steps:
- name: Abort if it's not a pre-release
if: github.event.release.prerelease == false
run: exit 1
- name: Checkout test branch
uses: actions/checkout@v3
with:
ref: 'test'

- name: Create Pull Request from tag branch to main
run: |
gh pr create --title "Release ${{ github.event.release.tag_name }}" --body "Release ${{ github.event.release.tag_name }}" --base main --head ${{ github.event.release.tag_name }} --repo ${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit d7e30a5

Please sign in to comment.