Skip to content

Commit 634bd22

Browse files
Merge pull request #8 from codenamephp/updateChangelogWorkflow
Testing a new workflow that opens and merges a pr
2 parents 3ac68c3 + 3cf5ae5 commit 634bd22

1 file changed

Lines changed: 35 additions & 6 deletions

File tree

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,44 @@
11
name: Update Changelog
22
on:
3-
merge_group:
3+
push:
4+
branches:
5+
- release
6+
paths-ignore:
7+
- '**.md'
48

59

610
jobs:
711
calculate_next_version:
12+
name: Calculate next version
813
uses: codenamephp/workflows.common/.github/workflows/calculate-next-version.yml@1
914
update_changelog:
10-
uses: codenamephp/workflows.common/.github/workflows/update-changelog.yml@1
15+
name: Update changelog
16+
runs-on: ubuntu-latest
1117
needs: calculate_next_version
12-
with:
13-
ref: ${{github.ref}}
14-
future-release: ${{ needs.calculate_next_version.outputs.version }}
15-
release-branch: ${{github.head_ref}}
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v3
21+
22+
- name: Create changelog
23+
uses: charmixer/auto-changelog-action@v1
24+
with:
25+
token: ${{ secrets.GITHUB_TOKEN }}
26+
future_release: ${{ needs.calculate_next_version.outputs.version }}
27+
release_branch: 'release'
28+
29+
- name: Create Pull Request
30+
id: cpr
31+
uses: peter-evans/create-pull-request@v4
32+
with:
33+
token: ${{ secrets.GITHUB_TOKEN }}
34+
commit-message: Update changelog
35+
branch: changelog
36+
delete-branch: true
37+
title: '[CHANGELOG] Update changelog'
38+
39+
40+
- name: Merge pull request
41+
uses: KeisukeYamashita/auto-pull-request-merge@v1
42+
with:
43+
pullRequestNumber: ${{ steps.cpr.outputs.pull-request-number }}
44+
intervalSeconds: 5

0 commit comments

Comments
 (0)