mirror of
https://github.com/Ellpeck/DynamicEnums.git
synced 2024-11-26 02:18:35 +01:00
36 lines
741 B
Text
36 lines
741 B
Text
|
pipeline {
|
||
|
agent any
|
||
|
stages {
|
||
|
stage('Test') {
|
||
|
steps {
|
||
|
sh 'dotnet test --collect:"XPlat Code Coverage"'
|
||
|
}
|
||
|
}
|
||
|
|
||
|
stage('Pack') {
|
||
|
steps {
|
||
|
sh 'find . -type f -name \\\'*.nupkg\\\' -delete'
|
||
|
sh 'dotnet pack --version-suffix ${BUILD_NUMBER}'
|
||
|
}
|
||
|
}
|
||
|
|
||
|
stage('Publish') {
|
||
|
when {
|
||
|
branch 'main'
|
||
|
}
|
||
|
steps {
|
||
|
sh 'dotnet nuget push -s https://nuget.ellpeck.de/v3/index.json **/*.nupkg -k $BAGET -n true'
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
post {
|
||
|
always {
|
||
|
nunit testResultsPattern: '**/TestResults.xml'
|
||
|
cobertura coberturaReportFile: '**/coverage.cobertura.xml'
|
||
|
}
|
||
|
}
|
||
|
environment {
|
||
|
BAGET = credentials('3db850d0-e6b5-43d5-b607-d180f4eab676')
|
||
|
}
|
||
|
}
|