Update build-dev.yml for Azure Pipelines
This commit is contained in:
Родитель
a234d76e2e
Коммит
4cb52eb9fe
|
@ -411,88 +411,88 @@ 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: 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
|
||||
# - 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;
|
||||
# #if ! [ $BRANCH = master ]; then
|
||||
# # VERSION=1.0.$BUILDNUMBER
|
||||
# # echo "##vso[build.updatebuildnumber]$VERSION"
|
||||
# #fi;
|
||||
|
||||
echo "##vso[task.setvariable variable=Version]$VERSION"
|
||||
# echo "##vso[task.setvariable variable=Version]$VERSION"
|
||||
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: Use Nuget 5.0.2
|
||||
inputs:
|
||||
versionSpec: '5.0.2'
|
||||
# - task: NuGetToolInstaller@1
|
||||
# displayName: Use Nuget 5.0.2
|
||||
# inputs:
|
||||
# versionSpec: '5.0.2'
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'nuget pack Comet.nuspec'
|
||||
inputs:
|
||||
command: pack
|
||||
packagesToPack: 'Comet.nuspec'
|
||||
versioningScheme: byEnvVar
|
||||
versionEnvVar: VERSION
|
||||
# - task: NuGetCommand@2
|
||||
# displayName: 'nuget pack Comet.nuspec'
|
||||
# inputs:
|
||||
# command: pack
|
||||
# packagesToPack: 'Comet.nuspec'
|
||||
# versioningScheme: byEnvVar
|
||||
# versionEnvVar: VERSION
|
||||
|
||||
- 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.Skia.nuspec'
|
||||
# inputs:
|
||||
# command: pack
|
||||
# packagesToPack: 'Comet.Skia.nuspec'
|
||||
# versioningScheme: byEnvVar
|
||||
# versionEnvVar: VERSION
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
SourceFolder: '$(Build.SourcesDirectory)'
|
||||
Contents: '**\*.nupkg'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||
# - task: CopyFiles@2
|
||||
# inputs:
|
||||
# SourceFolder: '$(Build.SourcesDirectory)'
|
||||
# Contents: '**\*.nupkg'
|
||||
# TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
||||
ArtifactName: 'drop_nuget_alpha'
|
||||
publishLocation: 'Container'
|
||||
# - task: PublishBuildArtifacts@1
|
||||
# inputs:
|
||||
# PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
||||
# ArtifactName: 'drop_nuget_alpha'
|
||||
# publishLocation: 'Container'
|
||||
|
||||
- task: Bash@3
|
||||
displayName: Publish to GitHub Package
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
script: |
|
||||
# Write your commands here
|
||||
# - 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 source Add -Name "GHNuget" \
|
||||
# -Source "https://nuget.pkg.github.com/Clancey/index.json" \
|
||||
# -UserName Clancey -Password $(GHToken)
|
||||
|
||||
nuget push *.nupkg -Source "GHNuget"
|
||||
# nuget push *.nupkg -Source "GHNuget"
|
||||
|
|
Загрузка…
Ссылка в новой задаче