Skip to content

Commit 2db4329

Browse files
committed
feat: create PR for build action
1 parent c0e1f43 commit 2db4329

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed

.github/workflows/build-action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Build and Compile code modules
22

33
on:
4+
push:
5+
branches:
6+
- main
47
release:
58
types: [released]
69

@@ -39,6 +42,7 @@ jobs:
3942
- name: Create Pull Request
4043
uses: peter-evans/create-pull-request@v5
4144
with:
45+
token: ${{ secrets.GITHUB_TOKEN }}
4246
branch: build-output-${{ github.run_id }}
4347
base: main
4448
title: "Build output for release ${{ github.sha }}"

.github/workflows/update-changelog.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,23 @@ jobs:
2424
latest-version: ${{ github.event.release.name }}
2525
release-notes: ${{ github.event.release.body }}
2626

27-
- name: Commit updated CHANGELOG
28-
uses: stefanzweifel/git-auto-commit-action@v5
27+
- name: Create a new branch
28+
run: |
29+
git config --global user.name "github-actions[bot]"
30+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
31+
git checkout -b update-changelog-${{ github.run_id }}
32+
git add CHANGELOG.md
33+
git commit -m "Update CHANGELOG for release ${{ github.event.release.name }}"
34+
35+
- name: Push changes to new branch
36+
run: git push origin update-changelog-${{ github.run_id }}
37+
38+
- name: Create Pull Request
39+
uses: peter-evans/create-pull-request@v5
2940
with:
30-
branch: main
31-
commit_message: Update CHANGELOG
32-
file_pattern: CHANGELOG.md
41+
token: ${{ secrets.GITHUB_TOKEN }}
42+
branch: update-changelog-${{ github.run_id }}
43+
base: main
44+
title: "Update CHANGELOG for release ${{ github.event.release.name }}"
45+
body: "This PR updates the CHANGELOG with details from release ${{ github.event.release.name }}."
46+
labels: changelog

0 commit comments

Comments
 (0)