From 1cc91532aff73f54fb5c9ece6deedd94cdb64a7f Mon Sep 17 00:00:00 2001 From: Reza Behzadan Date: Sun, 31 Mar 2024 13:09:14 +0330 Subject: [PATCH] Change upload method to attachment --- Jenkinsfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c26ecae..910106b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,9 +29,9 @@ pipeline { script { def repoOwner = 'reza' def repoName = 'go-hello-world' - def tagName = 'v1.0.2' - def releaseTitle = 'v1.0.2' - def releaseDescription = 'v1.0.2' + def tagName = 'v1.0.3' + def releaseTitle = 'v1.0.3' + def releaseDescription = 'v1.0.3' def zipFile = 'hello-world.zip' def createReleaseResponse = sh(script: """ @@ -45,7 +45,7 @@ pipeline { sh """ curl -X POST -H "Authorization: token ${GITEA_API_TOKEN}" -H "Content-Type: multipart/form-data" \\ - --data-binary @${zipFile} \\ + -F 'attachment=@${zipFile};type=application/zip' \\ "https://git.behzadan.ir/api/v1/repos/${repoOwner}/${repoName}/releases/${releaseID}/assets?name=${zipFile}" """