Skip to content

Commit 1a7b215

Browse files
committed
Simplify publish workflow and improve changelog generation
- Shorten workflow name to "Publish" for brevity - Replace `secrets.GITHUB_TOKEN` with `secrets.PAT_TOKEN` for enhanced permissions - Allows triggering of Docker workflow - Update changelog formatting to exclude "Signed-off-by" lines and include commit links - Remove unnecessary changelog code block from release notes Signed-off-by: Phillip Sitbon <phillip.sitbon@gmail.com>
1 parent 7368c6c commit 1a7b215

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

.github/workflows/publish.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish new release version
1+
name: Publish
22

33
on:
44
push:
@@ -40,7 +40,7 @@ jobs:
4040
uses: actions/checkout@v4
4141
with:
4242
fetch-depth: 0 # Need full history for commit count
43-
token: ${{ secrets.GITHUB_TOKEN }}
43+
token: ${{ secrets.PAT_TOKEN }}
4444

4545
- name: Install uv
4646
uses: astral-sh/setup-uv@v6
@@ -98,9 +98,9 @@ jobs:
9898
LATEST_TAG="magg/latest"
9999
100100
# Get changelog since last release with rich formatting
101-
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
102-
git log ${LATEST_TAG}..${{ github.sha }} --pretty=format:'### [%s](%h)%n**Author: %an <%ae>**%n*Date: %ad*%n%n%b%n' | sed -e '/^### /!{/^$/!s/^/> /}' -e 's/^$/>/g' >> $GITHUB_ENV
103-
echo "EOF" >> $GITHUB_ENV
101+
echo "CHANGELOG<<EOFEOF" >> $GITHUB_ENV
102+
git log ${LATEST_TAG}..${{ github.sha }} --pretty=format:'### [%s](https://github.com/${{ github.repository }}/commit/%H)%nDate: %ad*%n%n%b%n' | sed -e '/^Signed-off-by:/d' -e '/^### /!{/^$/!s/^/> /}' -e 's/^$/>/g' >> $GITHUB_ENV
103+
echo "EOFEOF" >> $GITHUB_ENV
104104
105105
# Delete remote latest tag FIRST (before creating new one)
106106
git push origin :refs/tags/${LATEST_TAG} || true
@@ -121,9 +121,7 @@ jobs:
121121
Automatically generated release triggered by commit ${{ github.sha }}
122122
123123
## Changes
124-
```
125124
${{ env.CHANGELOG }}
126-
```
127125
128126
## Installation
129127
```bash

0 commit comments

Comments
 (0)