Skip to content

Commit

Permalink
Add nuget package pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
RaidMax committed Feb 4, 2024
1 parent 6f5d638 commit 82d89b9
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 0 deletions.
1 change: 1 addition & 0 deletions Data/Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<Configurations>Debug;Release;Prerelease</Configurations>
<Platforms>AnyCPU</Platforms>
<Title>RaidMax.IW4MAdmin.Data</Title>
<Version>1.0.0.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions DeploymentFiles/deployment-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ trigger:
- release/pre
- master
- develop
paths:
exclude:
- '**/*.yml'
- '*.yml'

pr: none

Expand Down
65 changes: 65 additions & 0 deletions DeploymentFiles/nuget-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: '$(Date:yyyy.M.d)$(Rev:.r)'

pr: none

pool:
vmImage: 'windows-2022'

variables:
buildPlatform: 'Any CPU'
outputFolder: '$(Build.ArtifactStagingDirectory)\Publish\$(buildConfiguration)'
releaseType: verified
buildConfiguration: Stable
isPreRelease: false

jobs:
- job: Build_Pack
steps:
- task: UseDotNet@2
displayName: 'Install .NET Core 6 SDK'
inputs:
packageType: 'sdk'
version: '6.0.x'
includePreviewVersions: true

- task: NuGetToolInstaller@1

- task: PowerShell@2
displayName: 'Setup Build configuration'
condition: or(eq(variables['Build.SourceBranch'], 'refs/heads/release/pre'), eq(variables['Build.SourceBranch'], 'refs/heads/develop'))
inputs:
targetType: 'inline'
script: |
echo '##vso[task.setvariable variable=releaseType]prerelease'
echo '##vso[task.setvariable variable=buildConfiguration]Prerelease'
echo '##vso[task.setvariable variable=isPreRelease]true'
failOnStderr: true

- task: DotNetCoreCLI@2
displayName: 'Build Data'
inputs:
command: 'build'
projects: '**/Data.csproj'
arguments: '-c $(buildConfiguration)'

- task: DotNetCoreCLI@2
displayName: 'Build SLC'
inputs:
command: 'build'
projects: '**/SharedLibraryCore.csproj'
arguments: '-c $(buildConfiguration) /p:Version=$(Build.BuildNumber)'

- task: DotNetCoreCLI@2
displayName: 'Pack SLC'
inputs:
command: 'pack'
packagesToPack: '**/SharedLibraryCore.csproj'
nobuild: true
versioningScheme: 'byBuildNumber'

- task: PublishPipelineArtifact@1
displayName: 'Publish nuget package artifact'
inputs:
targetPath: '$(Build.Repository.LocalPath)/SharedLibraryCore/bin/$(buildConfiguration)/RaidMax.IW4MAdmin.SharedLibraryCore.$(Build.BuildNumber).nupkg'
artifact: 'SharedLibraryCore.$(Build.BuildNumber).nupkg'
publishLocation: 'pipeline'
1 change: 1 addition & 0 deletions IW4MAdmin.sln
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
version.txt = version.txt
DeploymentFiles\UpdateIW4MAdmin.ps1 = DeploymentFiles\UpdateIW4MAdmin.ps1
DeploymentFiles\UpdateIW4MAdmin.sh = DeploymentFiles\UpdateIW4MAdmin.sh
DeploymentFiles\nuget-pipeline.yml = DeploymentFiles\nuget-pipeline.yml
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharedLibraryCore", "SharedLibraryCore\SharedLibraryCore.csproj", "{AA0541A2-8D51-4AD9-B0AC-3D1F5B162481}"
Expand Down

0 comments on commit 82d89b9

Please sign in to comment.