makes cli build and be published to artifacts as well
piwigodotnet/pipeline/head There was a failure building this commit Details

This commit is contained in:
Philipp Häfelfinger 2022-12-11 21:58:12 +01:00
parent b30fd4ad2a
commit 34c38f19c8
2 changed files with 7 additions and 3 deletions

8
Jenkinsfile vendored
View File

@ -36,7 +36,9 @@ pipeline {
stage('packing') {
steps {
sh "dotnet pack ${env.WORKSPACE}/src/PiwigoDotnet.sln --no-restore -c Release -o ${env.WORKSPACE}/publish -p:Version=${env.PWDNVERSION}.${env.BUILD_NUMBER}"
sh "dotnet pack ${env.WORKSPACE}/src/PiwigoDotnet.sln --no-restore -c Release -o ${env.WORKSPACE}/publish/nuget -p:Version=${env.PWDNVERSION}.${env.BUILD_NUMBER}"
sh "dotnet publish ${env.WORKSPACE}/src/Piwigo.Client.Cli/Piwigo.Client.Cli.csproj -c Release --self-contained true -r linux-x64 -o ${env.WORKSPACE}/publish/cli-linux -p:Version=${env.APPVERSION}.${env.BUILD_NUMBER}"
sh "dotnet publish ${env.WORKSPACE}/src/Piwigo.Client.Cli/Piwigo.Client.Cli.csproj -c Release --self-contained true -r win-x64 -o ${env.WORKSPACE}/publish/cli-win -p:Version=${env.APPVERSION}.${env.BUILD_NUMBER}"
}
}
@ -44,7 +46,7 @@ pipeline {
// we only publish packages for the main branch
when { branch 'main' }
steps {
sh "dotnet nuget push --source gitea ${env.WORKSPACE}/publish/*.nupkg"
sh "dotnet nuget push --source gitea ${env.WORKSPACE}/publish/nuget/*.nupkg"
}
}
@ -52,7 +54,7 @@ pipeline {
post {
always {
archiveArtifacts artifacts: "publish/*.nupkg", onlyIfSuccessful: true
archiveArtifacts artifacts: "publish/**/*", onlyIfSuccessful: true
}
}
}

View File

@ -6,6 +6,8 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<PublishTrimmed>false</PublishTrimmed>
<PublishSingleFile>true</PublishSingleFile>
</PropertyGroup>
<ItemGroup>