diff --git a/Jenkinsfile b/Jenkinsfile index 755180b..b07efeb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -40,12 +40,11 @@ pipeline { } } - // we only publish packages for the main branch - if (env.BRANCH_NAME == 'main') { - stage('nuget publish') { - steps { - sh "dotnet nuget push --source gitea ${env.WORKSPACE}/publish/*.nupkg" - } + stage('nuget publish') { + // we only publish packages for the main branch + when { branch 'main' } + steps { + sh "dotnet nuget push --source gitea ${env.WORKSPACE}/publish/*.nupkg" } }