Skip to content

Commit c65d64b

Browse files
committed
fix: it like you mean it
1 parent d669fe5 commit c65d64b

File tree

1 file changed

+21
-16
lines changed

1 file changed

+21
-16
lines changed
Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: Create Release PR
22
on:
33
push:
4-
branches: [release-test]
4+
branches: [ release-test ]
55

6-
# Add permissions block
76
permissions:
87
contents: write
98
pull-requests: write
@@ -12,7 +11,7 @@ jobs:
1211
release:
1312
runs-on: ubuntu-latest
1413
steps:
15-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1615
with:
1716
fetch-depth: 0
1817
ref: release-test
@@ -25,7 +24,6 @@ jobs:
2524
- name: Semantic Release
2625
uses: cycjimmy/semantic-release-action@v4
2726
with:
28-
branch: release-test
2927
extra_plugins: |
3028
@semantic-release/commit-analyzer
3129
@semantic-release/release-notes-generator
@@ -34,16 +32,23 @@ jobs:
3432
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3533

3634
- name: Create Pull Request
37-
run: |
38-
echo "Checking differences between branches..."
39-
git diff release...release-test --name-only
35+
uses: peter-evans/create-pull-request@v7
36+
with:
37+
token: ${{ secrets.GITHUB_TOKEN }}
38+
title: 'chore: Create new release'
39+
base: release
40+
delete-branch: true
41+
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
42+
labels: |
43+
automated pr
44+
body: |
45+
Automated PR from release-test to release
4046
41-
# Create PR using gh cli
42-
gh pr create \
43-
--base release \
44-
--head release-test \
45-
--title "chore: Create new release" \
46-
--body "Automated PR from release-test to release" \
47-
|| echo "PR already exists or no changes to create PR"
48-
env:
49-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
Changes included in this PR:
48+
${{ github.event.head_commit.message }}
49+
50+
- name: Check outputs
51+
if: ${{ steps.cpr.outputs.pull-request-number }}
52+
run: |
53+
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
54+
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

0 commit comments

Comments
 (0)