github.com/goreleaser/goreleaser@v1.25.1/www/docs/ci/jenkins.md (about)

     1  # Jenkins
     2  
     3  Here is how to set up a [Jenkins](https://www.jenkins.io/) pipeline using Jenkinsfile:
     4  
     5  ```groovy
     6  pipeline {
     7    ...
     8  
     9    stages {
    10      stage('Compile') {
    11        steps {
    12          sh 'go build'
    13        }
    14      }
    15  
    16      stage('Test') {
    17        steps {
    18          sh 'go test ./...'
    19        }
    20      }
    21  
    22      stage ('Release') {
    23        when {
    24          buildingTag()
    25        }
    26  
    27        environment {
    28          GITHUB_TOKEN = credentials('github-token')
    29        }
    30  
    31        steps {
    32          sh 'curl -sfL https://goreleaser.com/static/run | bash'
    33        }
    34      }
    35    }
    36  }
    37  ```