Skip to content

Commit

Permalink
Reset build pipeline patch version
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjbauer committed Nov 3, 2023
1 parent afbe698 commit 8667fc0
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 98 deletions.
130 changes: 65 additions & 65 deletions azure-pipelines-photino.net-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,82 +2,82 @@
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core

trigger:
- debug
- debug

variables:
versionprefix: 0.9.0
versionprefix: 0.9.0

jobs:
- job: 'BuildPackageAndPublish'
- job: "BuildPackageAndPublish"

pool:
vmImage: windows-latest
pool:
vmImage: windows-latest

variables:
buildConfiguration: 'Debug'
variables:
buildConfiguration: "Debug"

steps:
- task: UseDotNet@2
displayName: 'Use .NET 7 sdk'
inputs:
packageType: sdk
version: 7.0.x
installationPath: $(Agent.ToolsDirectory)/dotnet
steps:
- task: UseDotNet@2
displayName: "Use .NET 7 sdk"
inputs:
packageType: sdk
version: 7.0.x
installationPath: $(Agent.ToolsDirectory)/dotnet

- task: CmdLine@2
displayName: 'Add NuGet source'
inputs:
script: 'dotnet nuget add source https://pkgs.dev.azure.com/tryphotino/Photino.Native/_packaging/PhotinoPackages/nuget/v3/index.json -n DevOpsArtifacts'
- task: CmdLine@2
displayName: "Add NuGet source"
inputs:
script: "dotnet nuget add source https://pkgs.dev.azure.com/tryphotino/Photino.Native/_packaging/PhotinoPackages/nuget/v3/index.json -n DevOpsArtifacts"

- task: NuGetAuthenticate@0
displayName: 'NuGet Authenticate'
- task: NuGetAuthenticate@0
displayName: "NuGet Authenticate"

#- task: CmdLine@2
# displayName: 'Build Photino.NET'
# inputs:
# script: 'dotnet build Photino.NET/Photino.NET.csproj -c $(buildConfiguration)'
#- task: CmdLine@2
# displayName: 'Build Photino.NET'
# inputs:
# script: 'dotnet build Photino.NET/Photino.NET.csproj -c $(buildConfiguration)'

#Build and Create NuGet package
- task: CmdLine@2
displayName: 'Build and Create NuGet package'
inputs:
script: 'dotnet pack Photino.NET/Photino.NET.csproj -c $(buildConfiguration) --include-symbols /p:Version=$(versionprefix)-dev-$(Build.BuildNumber) /p:PackageVersion=$(versionprefix)-dev-$(Build.BuildNumber)'
#Build and Create NuGet package
- task: CmdLine@2
displayName: "Build and Create NuGet package"
inputs:
script: "dotnet pack Photino.NET/Photino.NET.csproj -c $(buildConfiguration) --include-symbols /p:Version=$(versionprefix)-dev-$(Build.BuildNumber) /p:PackageVersion=$(versionprefix)-dev-$(Build.BuildNumber)"

#Create NuGet package
#- task: CmdLine@2
# displayName: 'Create NuGet package'
# inputs:
# script: 'nuget.exe pack Photino.NET/Photino.NET.nuspec -Version $(versionprefix)-$(Build.BuildNumber) -NonInteractive -Properties version=$(versionprefix)-$(Build.BuildNumber)'
#Create NuGet package
#- task: CmdLine@2
# displayName: 'Create NuGet package'
# inputs:
# script: 'nuget.exe pack Photino.NET/Photino.NET.nuspec -Version $(versionprefix)-$(Build.BuildNumber) -NonInteractive -Properties version=$(versionprefix)-$(Build.BuildNumber)'

#Publish NuGet package to Artifacts
- task: NuGetCommand@2
displayName: 'NuGet push'
inputs:
command: push
feedsToUse: 'select'
publishVstsFeed: 'Photino.Native/PhotinoPackages'
packagesToPush: 'Photino.NET/bin/$(buildConfiguration)/*.nupkg'
allowPackageConflicts: true
#Publish NuGet package to Artifacts
- task: NuGetCommand@2
displayName: "NuGet push"
inputs:
command: push
feedsToUse: "select"
publishVstsFeed: "Photino.Native/PhotinoPackages"
packagesToPush: "Photino.NET/bin/$(buildConfiguration)/*.nupkg"
allowPackageConflicts: true

# Uploads the NuGet package file to nuget.org
# Important notes:
# 1. For this to work, you need to create a 'service connection' with the same name
# as the 'publishFeedCredentials' value.
# 2. For security, you *must* ensure that 'Make secrets available to builds of forks'
# is disabled in your PR validation settings (inside build -> Edit -> Triggers).
# Otherwise, PRs would be able to push new packages even without being merged.
#- job: 'PublishToNuGet'
# dependsOn: 'CombinePackages'
# steps:
# - task: DownloadBuildArtifacts@0
# inputs:
# downloadPath: 'artifacts'
# artifactName: 'artifacts-combined'
# - task: NuGetCommand@2
# displayName: 'Publish to nuget.org'
# condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
# inputs:
# command: push
# packagesToPush: 'artifacts/artifacts-combined/*.nupkg'
# nuGetFeedType: external
# publishFeedCredentials: 'WebWindowNuGet'
# Uploads the NuGet package file to nuget.org
# Important notes:
# 1. For this to work, you need to create a 'service connection' with the same name
# as the 'publishFeedCredentials' value.
# 2. For security, you *must* ensure that 'Make secrets available to builds of forks'
# is disabled in your PR validation settings (inside build -> Edit -> Triggers).
# Otherwise, PRs would be able to push new packages even without being merged.
#- job: 'PublishToNuGet'
# dependsOn: 'CombinePackages'
# steps:
# - task: DownloadBuildArtifacts@0
# inputs:
# downloadPath: 'artifacts'
# artifactName: 'artifacts-combined'
# - task: NuGetCommand@2
# displayName: 'Publish to nuget.org'
# condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
# inputs:
# command: push
# packagesToPush: 'artifacts/artifacts-combined/*.nupkg'
# nuGetFeedType: external
# publishFeedCredentials: 'WebWindowNuGet'
66 changes: 33 additions & 33 deletions azure-pipelines-photino.net-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,46 @@
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core

trigger:
- manual
- manual

variables:
major: 2
minor: 4
minor: 5
patch: $[counter(variables['minor'], 0)] #this will reset when we bump minor
buildConfiguration: 'Release'
buildConfiguration: "Release"

jobs:
- job: 'BuildPackageAndPublish'
- job: "BuildPackageAndPublish"

pool:
vmImage: windows-latest
pool:
vmImage: windows-latest

steps:
- task: UseDotNet@2
displayName: 'Use .NET 7 sdk'
inputs:
packageType: sdk
version: 7.0.x
installationPath: $(Agent.ToolsDirectory)/dotnet
steps:
- task: UseDotNet@2
displayName: "Use .NET 7 sdk"
inputs:
packageType: sdk
version: 7.0.x
installationPath: $(Agent.ToolsDirectory)/dotnet

#Build and Create NuGet package
- task: CmdLine@2
displayName: 'Build and Create NuGet package'
inputs:
script: 'dotnet pack Photino.NET/Photino.NET.csproj -c $(buildConfiguration) /p:Version=$(major).$(minor).$(patch) /p:PackageVersion=$(major).$(minor).$(patch)'
#Build and Create NuGet package
- task: CmdLine@2
displayName: "Build and Create NuGet package"
inputs:
script: "dotnet pack Photino.NET/Photino.NET.csproj -c $(buildConfiguration) /p:Version=$(major).$(minor).$(patch) /p:PackageVersion=$(major).$(minor).$(patch)"

# Uploads the NuGet package file to nuget.org
# Important notes:
# 1. For this to work, you need to create a 'service connection' with the same name
# as the 'publishFeedCredentials' value.
# 2. For security, you *must* ensure that 'Make secrets available to builds of forks'
# is disabled in your PR validation settings (inside build -> Edit -> Triggers).
# Otherwise, PRs would be able to push new packages even without being merged.
- task: NuGetCommand@2
displayName: 'Publish to nuget.org'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
inputs:
command: push
packagesToPush: 'Photino.NET/bin/$(buildConfiguration)/*.nupkg'
nuGetFeedType: external
publishFeedCredentials: 'PhotinoNetNuGet'
# Uploads the NuGet package file to nuget.org
# Important notes:
# 1. For this to work, you need to create a 'service connection' with the same name
# as the 'publishFeedCredentials' value.
# 2. For security, you *must* ensure that 'Make secrets available to builds of forks'
# is disabled in your PR validation settings (inside build -> Edit -> Triggers).
# Otherwise, PRs would be able to push new packages even without being merged.
- task: NuGetCommand@2
displayName: "Publish to nuget.org"
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
inputs:
command: push
packagesToPush: "Photino.NET/bin/$(buildConfiguration)/*.nupkg"
nuGetFeedType: external
publishFeedCredentials: "PhotinoNetNuGet"

0 comments on commit 8667fc0

Please sign in to comment.