diff --git a/.woodpecker/ci.yml b/.woodpecker/ci.yml index 43039a1..5dbcc82 100644 --- a/.woodpecker/ci.yml +++ b/.woodpecker/ci.yml @@ -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" \