From b3d513ff2211379f6c9cf1b51d1e58a077bd252e Mon Sep 17 00:00:00 2001 From: "s.galanskiy" Date: Mon, 30 Jun 2025 16:14:35 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20.woodpecker/.woodpecker.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .woodpecker/.woodpecker.yml | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/.woodpecker/.woodpecker.yml b/.woodpecker/.woodpecker.yml index 65c34b3..b699e25 100644 --- a/.woodpecker/.woodpecker.yml +++ b/.woodpecker/.woodpecker.yml @@ -100,8 +100,34 @@ steps: - source version.env - git config user.name "s.galanskiy" - git config user.email "s.galanskiy@gossys.dev" - - git checkout develop + - git checkout test - git commit -am "Релиз $VERSION" - git tag "v$VERSION" - git push https://s.galanskiy:${GONETS}@dev.gossys.dev/s.galanskiy/gonets.git develop - - git push https://s.galanskiy:${GONETS}@dev.gossys.dev/s.galanskiy/gonets.git "v$VERSION" \ No newline at end of file + - git push https://s.galanskiy:${GONETS}@dev.gossys.dev/s.galanskiy/gonets.git "v$VERSION" + + release-upload: + image: curlimages/curl:latest + environment: + FORGEJO_TOKEN: + from_secret: FORGEJO_TOKEN + commands: + - VERSION=$(dpkg-parsechangelog -l./debian/changelog --show-field Version) + - TAG="v$VERSION" + - DEB_PATH="../gonets_${VERSION}_amd64.deb" + - | + curl -s -X POST "https://dev.gossys.dev/api/v1/repos/s.galanskiy/gonets/releases" \ + -H "Authorization: token ${FORGEJO_TOKEN}" \ + -H "Content-Type: application/json" \ + -d '{ + "tag_name": "'$TAG'", + "name": "Релиз '$TAG'", + "body": "Сборка .deb пакета для версии '$TAG'", + "draft": false, + "prerelease": false + }' || true + - | + curl -s -X POST \ + -H "Authorization: token ${FORGEJO_TOKEN}" \ + -F "attachment=@$DEB_PATH" \ + "https://dev.gossys.dev/api/v1/repos/s.galanskiy/gonets/releases/$TAG/assets"