Signed-off-by: Faumaray <faumaray@gmail.com>
This commit is contained in:
1 file changed
+21
Vendored
+21
@@ -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"
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user