Skip to content

Commit 8e5b4b8

Browse files
Arlodotexemichael-hawker
authored andcommitted
Fix scheduled release CI trigger and add sparse release notes
- Remove explicit token references to allow workflow triggering - Add --notes-start-tag for sparse release notes (only changes since previous tag) - Add --fail-on-no-commits to prevent empty releases
1 parent acda1c3 commit 8e5b4b8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/scheduled-releases.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,23 @@ jobs:
1818
- name: Checkout repository
1919
uses: actions/checkout@v4
2020
with:
21-
# Use a token with write permissions to push to the branch
22-
token: ${{ secrets.GITHUB_TOKEN }}
23-
fetch-depth: 0 # Fetch all history for merging
21+
fetch-depth: 0 # Fetch all history for tags
2422

2523
- name: Create release
2624
id: create-release
2725
run: |
2826
# Date in the format YYMMDD
2927
TAG="release/weekly/$(date +%y%m%d)"
28+
29+
# Get previous weekly tag for sparse release notes
30+
PREV_TAG=$(git tag --list 'release/weekly/*' --sort=-creatordate | head -n 1)
31+
3032
# gh release create will automatically create the tag if it doesn't exist
3133
# This triggers the build workflow's tag listener, unlike git tag + git push
3234
# which doesn't trigger workflows when done by Actions tokens
3335
gh release create "$TAG" \
3436
--title "Weekly Release $(date +%y%m%d)" \
3537
--generate-notes \
38+
--notes-start-tag "$PREV_TAG" \
39+
--fail-on-no-commits \
3640
--prerelease
37-
env:
38-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)