diff --git a/build/build-dev.yml b/build/build-dev.yml index d54d482b..f7b42f0b 100644 --- a/build/build-dev.yml +++ b/build/build-dev.yml @@ -421,88 +421,81 @@ stages: msbuildArguments: '/p:AppxPackageSigningEnabled=false' -# - stage: NugetPackPublish -# jobs: -# - job: DownloadArtifacts -# displayName: Download Artifacts from Build Stage -# pool: -# vmImage: 'windows-2019' -# demands: -# - MSBuild +- stage: NugetPackPublish + jobs: + - job: DownloadArtifacts + displayName: Download Artifacts from Build Stage + pool: + vmImage: 'windows-2019' + demands: + - MSBuild -# steps: -# - task: DownloadPipelineArtifact@2 -# inputs: -# buildType: 'current' -# targetPath: '$(Pipeline.Workspace)' + steps: + - task: DownloadPipelineArtifact@2 + inputs: + buildType: 'current' + targetPath: '$(Pipeline.Workspace)' -# - task: CopyFiles@2 -# inputs: -# SourceFolder: '$(Pipeline.Workspace)' -# Contents: | -# drop_windows/* -# drop_mac/* -# TargetFolder: '$(Build.SourcesDirectory)' - -# - task: Bash@3 -# displayName: 'Version Script' -# inputs: -# targetType: 'inline' -# script: | -# echo '$(Build_BuildID)' $BUILD_BUILDID -# BUILDNUMBER=$BUILD_BUILDID -# VERSION=0.1.$BUILDNUMBER-alpha -# echo 'VERSION ' $VERSION - -# #if ! [ $BRANCH = master ]; then -# # VERSION=1.0.$BUILDNUMBER -# # echo "##vso[build.updatebuildnumber]$VERSION" -# #fi; - -# echo "##vso[task.setvariable variable=Version]$VERSION" + - task: CopyFiles@2 + inputs: + SourceFolder: '$(Pipeline.Workspace)/drop_windows' + Contents: + /** + TargetFolder: '$(Build.SourcesDirectory)' -# - task: NuGetToolInstaller@1 -# displayName: Use Nuget $(NugetVersion) -# inputs: -# versionSpec: $(NugetVersion) + - task: CopyFiles@2 + inputs: + SourceFolder: '$(Pipeline.Workspace)/drop_mac' + Contents: | + /** + TargetFolder: '$(Build.SourcesDirectory)' -# - task: NuGetCommand@2 -# displayName: 'nuget pack Comet.nuspec' -# inputs: -# command: pack -# packagesToPack: 'Comet.nuspec' -# versioningScheme: byEnvVar -# versionEnvVar: VERSION + - task: Bash@3 + displayName: 'Version Script' + inputs: + targetType: 'inline' + script: | + echo '$(Build_BuildID)' $BUILD_BUILDID + BUILDNUMBER=$BUILD_BUILDID + VERSION=0.1.$BUILDNUMBER-alpha + echo 'VERSION ' $VERSION + + #if ! [ $BRANCH = master ]; then + # VERSION=1.0.$BUILDNUMBER + # echo "##vso[build.updatebuildnumber]$VERSION" + #fi; + + echo "##vso[task.setvariable variable=Version]$VERSION" + + - task: NuGetToolInstaller@1 + displayName: Use Nuget $(NugetVersion) + inputs: + versionSpec: $(NugetVersion) -# - task: NuGetCommand@2 -# displayName: 'nuget pack Comet.Skia.nuspec' -# inputs: -# command: pack -# packagesToPack: 'Comet.Skia.nuspec' -# versioningScheme: byEnvVar -# versionEnvVar: VERSION + - task: NuGetCommand@2 + displayName: 'nuget pack Comet.nuspec' + inputs: + command: pack + packagesToPack: 'Comet.nuspec' + versioningScheme: byEnvVar + versionEnvVar: VERSION -# - task: CopyFiles@2 -# inputs: -# SourceFolder: '$(Build.SourcesDirectory)' -# Contents: '**\*.nupkg' -# TargetFolder: '$(Build.ArtifactStagingDirectory)' + - task: NuGetCommand@2 + displayName: 'nuget pack Comet.Skia.nuspec' + inputs: + command: pack + packagesToPack: 'Comet.Skia.nuspec' + versioningScheme: byEnvVar + versionEnvVar: VERSION -# - task: PublishBuildArtifacts@1 -# inputs: -# PathtoPublish: '$(Build.ArtifactStagingDirectory)' -# ArtifactName: 'drop_nuget_alpha' -# publishLocation: 'Container' + - task: CopyFiles@2 + inputs: + SourceFolder: '$(Build.SourcesDirectory)' + Contents: '**\*.nupkg' + TargetFolder: '$(Build.ArtifactStagingDirectory)' -# - task: Bash@3 -# displayName: Publish to GitHub Package -# inputs: -# targetType: 'inline' -# script: | -# # Write your commands here - -# nuget source Add -Name "GHNuget" \ -# -Source "https://nuget.pkg.github.com/Clancey/index.json" \ -# -UserName Clancey -Password $(GHToken) - -# nuget push *.nupkg -Source "GHNuget" + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: 'nuget' + publishLocation: 'Container'