added new ci script

This commit is contained in:
Ell 2023-12-22 16:15:43 +01:00
parent 443c03b024
commit bfa5641849
2 changed files with 20 additions and 35 deletions

20
.woodpecker/main.yml Normal file
View file

@ -0,0 +1,20 @@
variables:
- &image mcr.microsoft.com/dotnet/sdk:8.0-jammy
steps:
build:
image: *image
commands: dotnet build
test:
image: *image
commands: dotnet test --collect:"XPlat Code Coverage"
pack:
image: *image
commands: dotnet pack --version-suffix $CI_PIPELINE_NUMBER
publish:
image: *image
when:
branch: main
event: push
commands: dotnet nuget push -s https://nuget.ellpeck.de/v3/index.json **/*.nupkg -k $BAGET_KEY -n
secrets:
- baget_key

35
Jenkinsfile vendored
View file

@ -1,35 +0,0 @@
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'
}
}
}
post {
always {
nunit testResultsPattern: '**/TestResults.xml'
cobertura coberturaReportFile: '**/coverage.cobertura.xml'
}
}
environment {
BAGET = credentials('3db850d0-e6b5-43d5-b607-d180f4eab676')
}
}