mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-22 20:58:34 +01:00
create automatic pack/publish for release branch
This commit is contained in:
parent
9010b9a403
commit
6b073d7174
1 changed files with 20 additions and 9 deletions
19
Jenkinsfile
vendored
19
Jenkinsfile
vendored
|
@ -10,22 +10,32 @@ done'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Pack') {
|
stage('Pack and Publish') {
|
||||||
|
when {
|
||||||
|
branch 'master'
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
sh 'find . -type f -name \'*.nupkg\' -delete'
|
sh 'find . -type f -name \'*.nupkg\' -delete'
|
||||||
sh '''for i in **/MLEM*.csproj; do
|
sh '''for i in **/MLEM*.csproj; do
|
||||||
dotnet pack $i --version-suffix ${BUILD_NUMBER}
|
dotnet pack $i --version-suffix ${BUILD_NUMBER}
|
||||||
|
done'''
|
||||||
|
sh '''for i in **/*.nupkg; do
|
||||||
|
dotnet nuget push -s http://localhost:5000/v3/index.json $i -k $BAGET -n true
|
||||||
done'''
|
done'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Publish') {
|
stage('Pack and Publish') {
|
||||||
when {
|
when {
|
||||||
branch 'master'
|
branch 'release'
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
|
sh 'find . -type f -name \'*.nupkg\' -delete'
|
||||||
|
sh '''for i in **/MLEM*.csproj; do
|
||||||
|
dotnet pack $i
|
||||||
|
done'''
|
||||||
sh '''for i in **/*.nupkg; do
|
sh '''for i in **/*.nupkg; do
|
||||||
dotnet nuget push -s http://localhost:5000/v3/index.json $i -k $BAGET -n true
|
dotnet nuget push -s https://api.nuget.org/v3/index.json $i -k $NUGET -n true
|
||||||
done'''
|
done'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,5 +43,6 @@ done'''
|
||||||
}
|
}
|
||||||
environment {
|
environment {
|
||||||
BAGET = credentials('3db850d0-e6b5-43d5-b607-d180f4eab676')
|
BAGET = credentials('3db850d0-e6b5-43d5-b607-d180f4eab676')
|
||||||
|
NUGET = credentials('e1bf7f6c-6047-4f7e-b639-15240a8f8351')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue