From c6d07cb20751480c74ccae9ca2b024360df2442f Mon Sep 17 00:00:00 2001 From: Faumaray Date: Sun, 19 Oct 2025 04:19:50 +0300 Subject: [PATCH] trying upload Signed-off-by: Faumaray --- Jenkinsfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 70586f6..5aab4ec 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -52,6 +52,27 @@ pipeline { } } } + stage('Publish-To-Gitea') { + steps { + withCredentials([string(credentialsId: 'GITEA_TOKEN', variable: 'GITEA_TOKEN')]) { + sh ''' + GITEA_URL="https://git.faumaray.ru" + REPO="VoidLoader/VoidLoaderCore" + TAG="build-${BUILD_NUMBER}" + + curl -X POST -H "Authorization: token $GITEA_TOKEN" \ + -H "Content-Type: application/json" \ + -d "{\\"tag_name\\": \\"$TAG\\", \\"name\\": \\"$TAG\\"}" \ + $GITEA_URL/api/v1/repos/$REPO/releases || true + + curl -X POST -H "Authorization: token $GITEA_TOKEN" \ + -F "attachment=@VoidLoader.zip" \ + "$GITEA_URL/api/v1/repos/$REPO/releases/$TAG/assets" + ''' + } + } + } + } }