create release before uploading to it
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/cron/ci Pipeline was successful

This commit is contained in:
2025-09-01 12:14:38 -04:00
parent 238e59d8b7
commit 54c57aee48

View File

@@ -45,6 +45,14 @@ steps:
commands:
- pdf=$(ls *.pdf | head -n1)
- tag=$(date +%F)
# Create the release (ignore error if it already exists)
- |
curl -s -o /dev/null -w "%{http_code}" -X POST \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"tag_name\": \"$tag\", \"name\": \"$tag\", \"draft\": false, \"prerelease\": false}" \
https://git.keligrubb.com/api/v1/repos/keligrubb/scrollsmith/releases || true
# Upload the PDF as a release asset
- |
curl -X POST \
-H "Authorization: token $GITEA_TOKEN" \