Skip to content

Commit 5c104d0

Browse files
Update automated update PR workflows and filter release notes
1 parent 06f33e8 commit 5c104d0

3 files changed

Lines changed: 19 additions & 4 deletions

File tree

.github/workflows/auto-merge-docs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Auto-merge Docs PRs
1+
name: Auto-merge Automated Update PRs
22

33
on:
44
pull_request:
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
auto-merge:
11-
if: github.event.pull_request.head.ref == 'docs-update' && (github.event.pull_request.user.login == 'ChrisTitusTech' || github.event.pull_request.user.login == 'github-actions[bot]')
11+
if: (github.event.pull_request.head.ref == 'docs-update' || github.event.pull_request.head.ref == 'sponsors-update') && (github.event.pull_request.user.login == 'ChrisTitusTech' || github.event.pull_request.user.login == 'github-actions[bot]')
1212
runs-on: ubuntu-latest
1313
permissions:
1414
pull-requests: write

.github/workflows/pre-release.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,29 @@ jobs:
109109
config-name: release-drafter.yml
110110
version: ${{ env.VERSION }}
111111

112+
- name: Remove Automated Updates from Release Notes
113+
id: filter_notes
114+
shell: pwsh
115+
env:
116+
RELEASE_NOTES: ${{ steps.generate_notes.outputs.body }}
117+
run: |
118+
$filteredNotes = ($env:RELEASE_NOTES -split '\r?\n' | Where-Object {
119+
$_ -notmatch '(?i)Update (Generated Dev Docs|Sponsors)'
120+
}) -join "`n"
121+
122+
$delimiter = [guid]::NewGuid().ToString()
123+
"body<<$delimiter" >> $env:GITHUB_OUTPUT
124+
$filteredNotes >> $env:GITHUB_OUTPUT
125+
$delimiter >> $env:GITHUB_OUTPUT
126+
112127
- name: Create and Upload Release
113128
id: create_release
114129
uses: softprops/action-gh-release@v3
115130
with:
116131
tag_name: ${{ env.VERSION }}
117132
name: Pre-Release ${{ env.VERSION }}
118133
body: |
119-
${{ steps.generate_notes.outputs.body }}
134+
${{ steps.filter_notes.outputs.body }}
120135
121136
![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/winutil/${{ env.VERSION }}/winutil.ps1)
122137
append_body: false

.github/workflows/sponsors.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
id: cpr
2727
uses: peter-evans/create-pull-request@v8
2828
with:
29-
token: ${{ secrets.GITHUB_TOKEN }}
29+
token: ${{ secrets.AUTO_MERGE }}
3030
commit-message: 'Update sponsors in README'
3131
title: 'chore: Update Sponsors README'
3232
body: 'Automated update of sponsors section'

0 commit comments

Comments
 (0)