diff --git a/Jenkinsfile b/Jenkinsfile index 8fd0516..9ce9185 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -143,7 +143,11 @@ pipeline { def json = """{"tag_name":"${env.RELEASE_TAG}","name":"${env.RELEASE_TAG}","body":"${bodyEscaped}","draft":false,"prerelease":false}""" writeFile file: 'release_payload.json', text: json - withCredentials([string(credentialsId: 'GITEA_TOKEN', variable: 'TOKEN')]) { + withCredentials([usernamePassword( + credentialsId: 'gitea-access-token', + usernameVariable: 'GITEA_USER', + passwordVariable: 'TOKEN' + )]) { bat """curl -sf -X POST "${env.GITEA_API_BASE}/repos/${env.GITEA_REPO_PATH}/releases" -H "Authorization: token %TOKEN%" -H "Content-Type: application/json" -d @release_payload.json""" } bat 'del release_payload.json'