New ๐ŸŒŠ wave for @helm

Commit e435a339

e435a339522bMerged

Dmitriy Zhilyaev <[email protected]> ยท 2 years ago ยท 1 file ยท ~1 modified

Description

fix(ci): changelog refactor

Signed-off-by: Dmitriy Zhilyaev [email protected]

Details

Commit
e435a339522b
Parent
a73462a3052f

.github/workflows/changelog.ymlmodifiedView file

@@ -16,17 +16,19 @@
1616 fetch-depth: 0
1717 ref: main
1818
19- - uses: actions/setup-go@v5
19+ - name: Generate release changelog
20+ uses: miniscruff/changie-action@v2
21+ id: version
22+ env:
23+ TAG: ${{ github.event.release.tag_name }}
2024 with:
21- go-version-file: go.mod
22-
23- - name: Download changie
24- run: go install github.com/miniscruff/changie@v1
25+ version: latest
26+ args: batch $TAG --force
2527
26- - name: Generate release changelog
27- run: changie batch $TAG --force
28+ - id: changelog
2829 env:
29- TAG: ${{ github.event.release.tag_name }}
30+ FILEPATH: .changes/${{ github.event.release.tag_name }}.md
31+ run: echo "changelog=$(cat $FILEPATH)" >> $GITHUB_OUTPUT
3032
3133 - name: Upload changelog artifact
3234 uses: actions/upload-artifact@v4
@@ -43,6 +45,9 @@
4345 - name: Merge changelog
4446 run: changie merge
4547
48+ - id: version
49+ run: echo "version=${TAG#v}" >> $GITHUB_OUTPUT
50+
4651 - name: Create Pull Request for changelog
4752 uses: peter-evans/create-pull-request@v7
4853 id: pr
@@ -53,9 +58,11 @@
5358 commit-message: "chore: update changelog ${{ github.event.release.tag_name }}"
5459 committer: GitHub <[email protected]>
5560 author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
56- branch: "changelog/${{ github.event.release.tag_name }}"
61+ branch: "changelog/${{ steps.version.outputs.version }}"
5762 delete-branch: true
58- title: "Changelog/${{ github.event.release.tag_name }}"
63+ title: "Changelog/${{ steps.version.outputs.version }}"
64+ labels: ${{ github.event.release.tag_name }},changelog
65+ body: ${{ steps.changelog.outputs.changelog }}
5966
6067 - uses: wow-actions/use-app-token@v2
6168 id: token
@@ -63,9 +70,10 @@
6370 app_id: ${{ secrets.GH_APP_ID }}
6471 private_key: ${{ secrets.GH_APP_PRIVATE_KEY }}
6572
66- - name: auto approve and merge
73+ - name: approve & merge
6774 run: |
68- gh pr review --approve ${{ steps.pr.outputs.pull-request-url }}
69- gh pr merge --admin --delete-branch --body-file .changes/${{ github.event.release.tag_name }}.md --merge ${{ steps.pr.outputs.pull-request-number }}
75+ gh pr review $PR --approve
76+ gh pr merge $PR --auto --merge -d -b ${{ steps.changelog.outputs.changelog }}
7077 env:
7178 GITHUB_TOKEN: ${{ steps.token.outputs.BOT_TOKEN }}
79+ PR: ${{ steps.pr.outputs.pull-request-number }}