create release before uploading to it
This commit is contained in:
@@ -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" \
|
||||
|
||||
Reference in New Issue
Block a user