-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1.54 KB
/
release-pr.yaml
File metadata and controls
43 lines (36 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# This workflow creates an automated release PR from `develop` into `main`.
#
# Usage:
# - Triggered manually via workflow_dispatch.
# - Creates a PR titled "Release: merge develop into master".
# - Adds the label "[maintainer] auto-pull-request" so it is excluded from changelogs.
# - The PR body makes clear that this is automation only (no review needed).
name: Release PR (develop -> master)
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: write
pull-requests: write
# Set the environment variables to be used in all jobs defined in this workflow
env:
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
jobs:
create-pull-request:
runs-on: ubuntu-latest
steps:
- name: Checkout develop branch
uses: actions/checkout@v5
with:
ref: develop
- name: Create PR from develop to ${{ env.DEFAULT_BRANCH }}
run: |
gh pr create \
--base ${{ env.DEFAULT_BRANCH }} \
--head develop \
--title "Release: merge develop into ${{ env.DEFAULT_BRANCH }}" \
--label "[maintainer] auto-pull-request" \
--body "⚠️ This PR is created automatically to trigger the release pipeline. It merges the accumulated changes from \`develop\` into \`${{ env.DEFAULT_BRANCH }}\`.
It is labeled \`[maintainer] auto-pull-request\` and is excluded from release notes and version bump logic."
env:
GITHUB_TOKEN: ${{ secrets.GH_API_PERSONAL_ACCESS_TOKEN }}