actions: add changelog tracking
changelog / changelog (push) Successful in 6s

This commit is contained in:
2026-06-24 14:59:58 -04:00
parent 0c26e2c106
commit dd53489dfa
+32
View File
@@ -0,0 +1,32 @@
name: changelog
on:
push:
branches:
- dev
jobs:
changelog:
runs-on: ubuntu-latest
container: docker.io/thegeeklab/git-sv:2.1.3
steps:
- name: install tools
run: |
apk add -q --update --no-cache nodejs curl jq sed
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Generate upcoming changelog
run: |
git sv rn -o changelog.md
export RELEASE_NOTES=$(cat changelog.md)
export ISSUE_NUMBER=$(curl -s "https://git.dubyatp.xyz/api/v1/repos/williamp/yt-dlp-bot/issues?state=open&q=Changelog%20for%20upcoming%20version" | jq '.[].number')
echo $RELEASE_NOTES
JSON_DATA=$(echo "" | jq -Rs --arg title 'Changelog for upcoming version' --arg body "$(cat changelog.md)" '{title: $title, body: $body}')
if [ -z "$ISSUE_NUMBER" ]; then
curl -s -X POST "https://git.dubyatp.xyz/api/v1/repos/williamp/yt-dlp-bot/issues" -H "Authorization: token ${{ secrets.ACTIONS_TOKEN }}" -H "Content-Type: application/json" -d "$JSON_DATA"
else
curl -s -X PATCH "https://git.dubyatp.xyz/api/v1/repos/williamp/yt-dlp-bot/issues/$ISSUE_NUMBER" -H "Authorization: token ${{ secrets.ACTIONS_TOKEN }}" -H "Content-Type: application/json" -d "$JSON_DATA"
fi