Compare commits

...

3 Commits
v1.0.1 ... main

10
Jenkinsfile vendored
View File

@ -29,9 +29,9 @@ pipeline {
script { script {
def repoOwner = 'reza' def repoOwner = 'reza'
def repoName = 'go-hello-world' def repoName = 'go-hello-world'
def tagName = 'v1.0.1' def tagName = 'v1.0.3'
def releaseTitle = 'v1.0.1' def releaseTitle = 'v1.0.3'
def releaseDescription = 'v1.0.1' def releaseDescription = 'v1.0.3'
def zipFile = 'hello-world.zip' def zipFile = 'hello-world.zip'
def createReleaseResponse = sh(script: """ def createReleaseResponse = sh(script: """
@ -44,8 +44,8 @@ pipeline {
def releaseID = parsedResponse.id def releaseID = parsedResponse.id
sh """ sh """
curl -X POST -H "Authorization: token ${GITEA_API_TOKEN}" -H "Content-Type: application/octet-stream" \\ 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}" "https://git.behzadan.ir/api/v1/repos/${repoOwner}/${repoName}/releases/${releaseID}/assets?name=${zipFile}"
""" """