Skip to content

Commit

Permalink
Avoid creating the release on GitHub (#2059)
Browse files Browse the repository at this point in the history
  • Loading branch information
yahavi authored Jul 4, 2023
1 parent 74153b9 commit 9e3efbe
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -133,29 +133,22 @@ def runRelease(architectures) {
}
}
if (identifier == "v2") {
createTagAndRelease()
createTag()
}
}
} finally {
cleanupRepo21()
}
}

def createTagAndRelease() {
def createTag() {
stage('Create a tag and a GitHub release') {
dir("$jfrogCliRepoDir") {
releaseTag = "v$RELEASE_VERSION"
withCredentials([string(credentialsId: 'ecosystem-github-automation', variable: 'GITHUB_ACCESS_TOKEN')]) {
sh """#!/bin/bash
git tag $releaseTag
git push "https://$GITHUB_ACCESS_TOKEN@github.com/jfrog/jfrog-cli.git" --tags
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_ACCESS_TOKEN"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/jfrog/jfrog-cli/releases \
-d '{"tag_name":"$releaseTag","target_commitish":"$BRANCH","name":"$RELEASE_VERSION","generate_release_notes":true}'
"""
}
}
Expand Down

0 comments on commit 9e3efbe

Please sign in to comment.