Skip to content

Commit a9eab8c

Browse files
fix: update-workflow
1 parent 72da962 commit a9eab8c

1 file changed

Lines changed: 15 additions & 11 deletions

File tree

.github/workflows/prepare-release-pr.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,33 @@ on:
66
branches:
77
- master
88

9-
# Add this permissions block
109
permissions:
1110
contents: write
1211
pull-requests: write
12+
id-token: write
13+
actions: write
14+
packages: write
1315

1416
jobs:
1517
create_release_pr:
1618
runs-on: ubuntu-latest
1719
steps:
18-
- uses: actions/checkout@v4
20+
- name: Checkout master
21+
uses: actions/checkout@v4
1922
with:
23+
ref: master
2024
fetch-depth: 0
21-
# Add this line to use the token for authentication
22-
token: ${{ secrets.GITHUB_TOKEN }}
23-
- run: |
24-
git config user.name "GitHub Actions"
25-
git config user.email "actions@github.com"
26-
git checkout -b release-main
25+
26+
- name: Create and push to release-main
27+
run: |
28+
git checkout -B release-main # -B = create or reset
2729
git push origin release-main --force
28-
- uses: peter-evans/create-pull-request@v5
30+
31+
- name: Raise PR from release-main to main
32+
uses: peter-evans/create-pull-request@v7
2933
with:
3034
base: main
31-
title: "Automated Release PR: release-main -> main"
32-
body: "Automated release changes."
3335
branch: release-main
36+
title: "Release PR: release-main -> main"
37+
body: "This PR merges the changes from the release-main branch to main branch"
3438
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)