From d07d742528168a0e5a8ab08e245b8a1697e969e9 Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 23 Jul 2025 10:55:00 +0200 Subject: [PATCH] fix: use plugins/github-release for Drone CI/CD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace manual curl approach with plugins/github-release - Fixes shell parsing issues with multiline strings - Properly passes GITHUB_TOKEN via api_key setting - Uses YAML multiline string (|) for release notes - Cleaner and more reliable approach 🤖 Generated with Claude Code Co-Authored-By: Claude --- .drone.yml | 60 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 20 deletions(-) diff --git a/.drone.yml b/.drone.yml index 5809ed2..526a888 100644 --- a/.drone.yml +++ b/.drone.yml @@ -110,29 +110,49 @@ steps: # -------- NEW: Create GitHub Release -------- - name: github-release - image: curlimages/curl:latest + image: plugins/github-release when: event: tag - environment: - GITHUB_TOKEN: + settings: + api_key: from_secret: GITHUB_TOKEN - commands: - - > - echo '{ - "tag_name": "'${DRONE_TAG}'", - "target_commitish": "main", - "name": "PicPeak '${DRONE_TAG}'", - "body": "# PicPeak '${DRONE_TAG}'\n\n## 🐳 Docker Images\n\nThis release includes Docker images published to GitHub Container Registry:\n\n```bash\n# Backend\ndocker pull ghcr.io/the-luap/picpeak-backend:'${DRONE_TAG}'\ndocker pull ghcr.io/the-luap/picpeak-backend:latest\n\n# Frontend\ndocker pull ghcr.io/the-luap/picpeak-frontend:'${DRONE_TAG}'\ndocker pull ghcr.io/the-luap/picpeak-frontend:latest\n```\n\n## 📦 What'"'"'s New\n\nSee the [README](https://github.com/the-luap/picpeak#readme) for features and documentation.\n\n## 🚀 Quick Start\n\n```bash\n# Clone and deploy\ngit clone https://github.com/the-luap/picpeak.git\ncd picpeak\n\n# Use the tagged version\ndocker-compose -f docker-compose.prod.yml up -d\n```\n\n---\n\nFor detailed deployment instructions, see the [Deployment Guide](https://github.com/the-luap/picpeak/blob/main/DEPLOYMENT.md).", - "draft": false, - "prerelease": false - }' > /tmp/release.json - - > - curl -X POST - -H "Accept: application/vnd.github+json" - -H "Authorization: Bearer ${GITHUB_TOKEN}" - -H "X-GitHub-Api-Version: 2022-11-28" - https://api.github.com/repos/the-luap/picpeak/releases - -d @/tmp/release.json + files: [] + title: PicPeak ${DRONE_TAG} + note: | + # PicPeak ${DRONE_TAG} + + ## 🐳 Docker Images + + This release includes Docker images published to GitHub Container Registry: + + ```bash + # Backend + docker pull ghcr.io/the-luap/picpeak-backend:${DRONE_TAG} + docker pull ghcr.io/the-luap/picpeak-backend:latest + + # Frontend + docker pull ghcr.io/the-luap/picpeak-frontend:${DRONE_TAG} + docker pull ghcr.io/the-luap/picpeak-frontend:latest + ``` + + ## 📦 What's New + + See the [README](https://github.com/the-luap/picpeak#readme) for features and documentation. + + ## 🚀 Quick Start + + ```bash + # Clone and deploy + git clone https://github.com/the-luap/picpeak.git + cd picpeak + + # Use the tagged version + docker-compose -f docker-compose.prod.yml up -d + ``` + + --- + + For detailed deployment instructions, see the [Deployment Guide](https://github.com/the-luap/picpeak/blob/main/DEPLOYMENT.md). trigger: event: