ForgeCore/Jenkinsfile
2024-12-17 12:10:01 -07:00

56 lines
No EOL
1.4 KiB
Groovy

pipeline {
agent any
options {
buildDiscarder (
logRotator(
numToKeepStr: '5'
)
)
}
stages {
stage("Build on Linux") {
agent {
label 'linux'
}
steps {
script {
sh '''
dotnet restore
dotnet publish ForgeCore.csproj --nologo -c Release --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true
'''
}
}
post {
always {
archiveArtifacts artifacts: "bin/Release/net8.0/publish/ForgeCore"
}
}
}
stage("Build on Windows") {
agent {
label 'windows'
}
steps {
script {
bat '''
dotnet restore
dotnet publish ForgeCore.csproj --nologo -c Release --self-contained true /p:PublishSingleFile=true /p:PublishTrimmed=true
'''
}
}
post {
always {
archiveArtifacts artifacts:"bin\\Release\\net8.0\\publish\\ForgeCore.exe"
}
}
}
}
}