pipeline { agent { docker { image 'rbehzadan/golang_goreleaser:1.22.1-1.24.0' } } environment { GITEA_TOKEN = credentials('git.behzadan.ir') } stages { stage('Test') { steps { sh 'make test' } } stage('Release') { steps { sh 'git config --global user.email "rbehzadan@gmail.com"' sh 'git config --global user.name "Reza Behzadan"' sh 'git tag -a v$(cat VERSION) -m "v$(cat VERSION)"' sh 'goreleaser release' } } stage('Cleanup') { steps { sh 'make clean' } } } }