mirror of
https://github.com/Ellpeck/DynamicEnums.git
synced 2024-12-22 12:19:24 +01:00
added new ci script
This commit is contained in:
parent
443c03b024
commit
bfa5641849
2 changed files with 20 additions and 35 deletions
20
.woodpecker/main.yml
Normal file
20
.woodpecker/main.yml
Normal 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
35
Jenkinsfile
vendored
|
@ -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')
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue