1 Star 0 Fork 0

nanoFramework中文社区/nf-Visual-Studio-extension

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
azure-pipelines.yml 23.50 KB
一键复制 编辑 原始数据 按行查看 历史
josesimoes 提交于 2022-08-08 19:37 +08:00 . Work CI-CD
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661
trigger:
branches:
include:
- main
- develop
- release-*
paths:
exclude:
- README.md
- LICENSE.md
- CHANGELOG*.md
- NuGet.Config
- .github_changelog_generator
- .gitignore
tags:
include:
- refs/tags/v*
# PR always trigger build
pr:
autoCancel: true
# add nf-tools repo to resources (for Azure Pipelines templates)
resources:
repositories:
- repository: templates
type: github
name: nanoframework/nf-tools
endpoint: nanoframework
jobs:
##############################
- job: Get_Build_Options
pool:
vmImage: 'windows-latest'
steps:
- checkout: self
# check which project(s) have changed
- powershell: |
git config --global user.email "nfbot"
git config --global user.name "nanoframework@outlook.com"
$auth = "basic $([System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes(":$(GitHubToken)"))))"
$commit = Invoke-RestMethod -Uri "https://api.github.com/repos/nanoframework/nf-Visual-Studio-extension/commits/$(Build.SourceVersion)" -Header @{"Authorization"="$auth"} -ContentType "application/json" -Method GET
Write-host "Files changed:"
$commit.files | % {$_.filename}
# default values
echo "##vso[task.setvariable variable=BUILD_VS2019;isOutput=true]false"
echo "##vso[task.setvariable variable=BUILD_VS2022;isOutput=true]false"
if( ($commit.files.filename -like "*CSharp.AssemblyInfoTemplate*") -Or
($commit.files.filename -like "*CSharp.BlankApplication*") -Or
($commit.files.filename -like "*CSharp.ClassLibrary*") -Or
($commit.files.filename -like "*CSharp.ClassTemplate*") -Or
($commit.files.filename -like "*CSharp.ResourceTemplate*") -Or
($commit.files.filename -like "*Tools.BuildTasks*") -Or
($commit.files.filename -like "*Tools.BuildTasks-2019*") -Or
($commit.files.filename -like "*Tools.CorHelper*") -Or
($commit.files.filename -like "*Tools.MetaDataProcessor*") -Or
($commit.files.filename -like "*Tools.Parser*") -Or
($commit.files.filename -like "*Tools.BuildTasks-2017*") -Or
($commit.files.filename -like "*Tools.BuildTasks*") -Or
($commit.files.filename -like "*vs-extension.shared*") -Or
($commit.files.filename -like "*azure-pipelines.yml")
)
{
# global changes, build both
echo "##vso[task.setvariable variable=BUILD_VS2019;isOutput=true]true"
echo "##vso[task.setvariable variable=BUILD_VS2022;isOutput=true]true"
}
else
{
if( $commit.files.filename -like "*nanoFramework.Tools.VisualStudio.sln")
{
# changes here impact VS2022 and VS2019
echo "##vso[task.setvariable variable=BUILD_VS2019;isOutput=true]true"
echo "##vso[task.setvariable variable=BUILD_VS2022;isOutput=true]true"
}
if( $commit.files.filename -like "*VisualStudio.Extension-2019/*" )
{
# changes here only impact VS2022 and VS2019
echo "##vso[task.setvariable variable=BUILD_VS2019;isOutput=true]true"
echo "##vso[task.setvariable variable=BUILD_VS2022;isOutput=true]true"
}
if( $commit.files.filename -like "*VisualStudio.Extension-2022/*" )
{
# changes here only impact VS2022
echo "##vso[task.setvariable variable=BUILD_VS2022;isOutput=true]true"
}
}
name: BuildOptions
displayName: Get what to build
condition: not(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
- powershell: |
# read VS2019 manifest file
$vs2019Manifest = Get-Content VisualStudio.Extension-2019/source.extension.vsixmanifest -Encoding utf8
$VersionFormatChecks = $vs2019Manifest | Where-Object {$_.ToString() -match "(?>Version=""\|%CurrentProject%;GetBuildVersion\|"")"}
if($null -eq $VersionFormatChecks)
{
Write-Host "***************************************************"
Write-Host "* WRONG format on version in VS2019 manifest file *"
Write-Host "***************************************************"
exit 1
}
# read VS2022 manifest file
$vs2022Manifest = Get-Content VisualStudio.Extension-2022/source.extension.vsixmanifest -Encoding utf8
$VersionFormatChecks = $vs2022Manifest | Where-Object {$_.ToString() -match "(?>Version=""\|%CurrentProject%;GetBuildVersion\|"")"}
if($null -eq $VersionFormatChecks)
{
Write-Host "***************************************************"
Write-Host "* WRONG format on version in VS2022 manifest file *"
Write-Host "***************************************************"
exit 1
}
displayName: Check proper version format
######################
- job: VS2019
condition: >-
or(
eq(dependencies.Get_Build_Options.outputs['BuildOptions.BUILD_VS2019'], true),
eq(variables['BUILD_VS2019'], 'true'),
startsWith(variables['Build.SourceBranch'], 'refs/tags/v2019')
)
dependsOn:
- Get_Build_Options
pool:
vmImage: 'windows-latest'
variables:
DOTNET_NOLOGO: true
solution: 'VisualStudio.Extension-2019/VisualStudio.Extension-vs2019.csproj'
buildConfiguration: 'Release'
steps:
# need this here in order to persist GitHub credentials AND init submodules
- checkout: self
submodules: true
- script: |
git config --global user.email 'nanoframework@outlook.com'
git config --global user.name 'nfbot'
displayName: Setup git identity
- template: azure-pipelines-templates/install-nuget.yml@templates
- task: NuGetCommand@2
inputs:
restoreSolution: 'nanoFramework.Tools.VisualStudio.sln'
feedsToUse: config
nugetConfigPath: NuGet.config
verbosityRestore: quiet
- task: VSBuild@1
inputs:
solution: '$(solution)'
msbuildArgs: '/p:PublicRelease=true'
configuration: '$(buildConfiguration)'
maximumCpuCount: true
# we don't have tests (yet)
# - task: VSTest@2
# inputs:
# platform: '$(buildPlatform)'
# configuration: '$(buildConfiguration)'
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
$versionData = & nbgv get-version -f json -p VisualStudio.Extension-2019
$versionData =$versionData | ConvertFrom-Json
$version = $versionData.AssemblyVersion
Write-Host "VS2019 build version $version"
echo "##vso[task.setvariable variable=BUILD_VERSION;isOutput=true]$version"
condition: succeeded()
name: VS2019_Build
displayName: Store VS2019 build version
- task: CopyFiles@1
inputs:
sourceFolder: $(Build.SourcesDirectory)
Contents: |
**\*VS2019.Extension.vsix
**\vs2019-extension-manifest.json
**\vs2019-marketplace-overview.md
**\vs2019\debug-session.png
**\vs2019\starting-new-project.png
TargetFolder: '$(Build.ArtifactStagingDirectory)\vs2019'
flattenFolders: true
condition: succeeded()
displayName: Collecting VS2019 deployable artifacts
- task: DotNetCoreCLI@2
displayName: Install SignTool tool
condition: and( succeeded(), eq(variables['System.PullRequest.PullRequestId'], '') )
inputs:
command: custom
custom: tool
arguments: install --tool-path . SignClient
- pwsh: |
.\SignClient "Sign" `
--baseDirectory "$(Build.ArtifactStagingDirectory)\vs2019" `
--input "**\*.vsix" `
--config "$(Build.Repository.LocalPath)\config\SignClient.json" `
--filelist "$(Build.Repository.LocalPath)\config\filelist.txt" `
--user "$(SignClientUser)" `
--secret '$(SignClientSecret)' `
--name ".NET nanoFramework VS2019 Extension" `
--description ".NET nanoFramework VS2019 Extension" `
--descriptionUrl "https://github.com/$env:Build_Repository_Name"
displayName: Sign VS2019 packages
condition: and( succeeded(), eq(variables['System.PullRequest.PullRequestId'], '') )
# publish artifacts (only possible if this is not a PR originated on a fork)
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: deployables
ArtifactType: Container
condition: and( succeeded(), ne(variables['system.pullrequest.isfork'], true) )
displayName: Publish deployables artifacts
# upload extension to Open VSIX Gallery (only possible if this is not a PR from a fork)
- task: PowerShell@2
displayName: Upload vsix to Open VSIX Gallery
condition: >-
and(
succeeded(),
ne(variables['system.pullrequest.isfork'], true),
eq(variables['System.PullRequest.PullRequestId'], '')
)
continueOnError: true
inputs:
targetType: 'inline'
script: |
$artifactsCollection = @("./*VS2019.Extension.vsix") | %{ Get-ChildItem -File . -Filter $_ -Recurse}
(new-object Net.WebClient).DownloadString("https://raw.github.com/madskristensen/ExtensionScripts/master/AppVeyor/vsix.ps1") | iex
foreach($file in $artifactsCollection)
{
"Uploading VSIX package to Open VSIX Gallery..." | Write-Host
Vsix-PublishToGallery $file
}
# create or update GitHub release
- task: GithubRelease@1
condition: >-
and(
succeeded(),
eq(variables['System.PullRequest.PullRequestId'], ''),
not(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
)
displayName: Create/Update GitHub release
inputs:
gitHubConnection: 'github.com_nano-$(System.TeamProject)'
tagSource: userSpecifiedTag
tag: v$(VS2019_Build.BUILD_VERSION)
title: '.NET nanoFramework VS Extension v$(VS2019_Build.BUILD_VERSION)'
releaseNotesSource: inline
releaseNotesInline: 'Check the [changelog](https://github.com/nanoframework/nf-Visual-Studio-extension/blob/$(Build.SourceBranchName)/CHANGELOG-VS2019.md).<br><br><h4>Install from Open VSIX Gallery development feed.</h4><br>The following Visual Studio Extension is available for install from this release:<br><br>:package: [nanoFramework VS2019 Extension](http://vsixgallery.com/extension/455f2be5-bb07-451e-b351-a9faf3018dc9)'
assets: '$(Build.ArtifactStagingDirectory)/**/*.vsix'
assetUploadMode: replace
isPreRelease: true
isDraft: true
addChangeLog: false
# create or update GitHub release ON tags from release or main branches
- task: GithubRelease@1
condition: >-
and(
succeeded(),
startsWith(variables['Build.SourceBranch'], 'refs/tags/v'),
contains(variables['Build.SourceBranch'], 'vs2019'),
or(
eq(variables['Build.SourceBranchName'], 'main'),
contains(variables['Build.SourceBranchName'], 'release')
)
)
displayName: Create/Update GitHub stable release
inputs:
action: edit
gitHubConnection: 'github.com_nano-$(System.TeamProject)'
tagSource: userSpecifiedTag
tag: v$(VS2019_Build.BUILD_VERSION)
title: '.NET nanoFramework VS Extension v$(VS2019_Build.BUILD_VERSION)'
releaseNotesSource: inline
releaseNotesInline: 'Check the [changelog](https://github.com/nanoframework/nf-Visual-Studio-extension/blob/$(Build.SourceBranchName)/CHANGELOG-VS2019.md).<br><br><h4>Install from Visual Studio Marketplace.</h4><br>The following Visual Studio Extension is available for install from this release:<br><br>:package: [.NET nanoFramework VS2019 Extension](https://marketplace.visualstudio.com/items?itemName=nanoframework.nanoFramework-VS2019-Extension)'
assets: '$(Build.ArtifactStagingDirectory)/**/*.vsix'
assetUploadMode: replace
isPreRelease: false
addChangeLog: false
######################
- job: VS2022
condition: >-
or(
eq(dependencies.Get_Build_Options.outputs['BuildOptions.BUILD_VS2022'], true),
eq(variables['BUILD_VS2022'], 'true'),
startsWith(variables['Build.SourceBranch'], 'refs/tags/v2022')
)
dependsOn:
- Get_Build_Options
pool:
vmImage: 'windows-latest'
variables:
DOTNET_NOLOGO: true
solution: 'VisualStudio.Extension-2022/VisualStudio.Extension-vs2022.csproj'
buildConfiguration: 'Release'
steps:
# need this here in order to persist GitHub credentials AND init submodules
- checkout: self
submodules: true
- script: |
git config --global user.email 'nanoframework@outlook.com'
git config --global user.name 'nfbot'
displayName: Setup git identity
- template: azure-pipelines-templates/install-nuget.yml@templates
- task: NuGetCommand@2
inputs:
restoreSolution: 'nanoFramework.Tools.VisualStudio.sln'
feedsToUse: config
nugetConfigPath: NuGet.config
verbosityRestore: quiet
- task: VSBuild@1
inputs:
solution: '$(solution)'
msbuildArgs: '/p:PublicRelease=true'
configuration: '$(buildConfiguration)'
maximumCpuCount: true
msbuildArchitecture: 'x64'
platform: 'x64'
# we don't have tests (yet)
# - task: VSTest@2
# inputs:
# platform: '$(buildPlatform)'
# configuration: '$(buildConfiguration)'
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
$versionData = & nbgv get-version -f json -p VisualStudio.Extension-2022
$versionData =$versionData | ConvertFrom-Json
$version = $versionData.AssemblyVersion
Write-Host "VS2022 build version $version"
echo "##vso[task.setvariable variable=BUILD_VERSION;isOutput=true]$version"
condition: succeeded()
name: VS2022_Build
displayName: Store VS2022 build version
- task: CopyFiles@1
inputs:
sourceFolder: $(Build.SourcesDirectory)
Contents: |
**\*VS2022.Extension.vsix
**\vs2022-extension-manifest.json
**\vs2022-marketplace-overview.md
**\vs2022\debug-session.png
**\vs2022\starting-new-project.png
TargetFolder: '$(Build.ArtifactStagingDirectory)\vs2022'
flattenFolders: true
condition: succeeded()
displayName: Collecting VS2022 deployable artifacts
- task: DotNetCoreCLI@2
displayName: Install SignTool tool
condition: and( succeeded(), eq(variables['System.PullRequest.PullRequestId'], '') )
inputs:
command: custom
custom: tool
arguments: install --tool-path . SignClient
- pwsh: |
.\SignClient "Sign" `
--baseDirectory "$(Build.ArtifactStagingDirectory)\vs2022" `
--input "**\*.vsix" `
--config "$(Build.Repository.LocalPath)\config\SignClient.json" `
--filelist "$(Build.Repository.LocalPath)\config\filelist.txt" `
--user "$(SignClientUser)" `
--secret '$(SignClientSecret)' `
--name ".NET nanoFramework VS2022 Extension" `
--description ".NET nanoFramework VS2022 Extension" `
--descriptionUrl "https://github.com/$env:Build_Repository_Name"
displayName: Sign VS2022 packages
condition: and( succeeded(), eq(variables['System.PullRequest.PullRequestId'], '') )
# publish artifacts (only possible if this is not a PR originated on a fork)
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: deployables
ArtifactType: Container
condition: and( succeeded(), ne(variables['system.pullrequest.isfork'], true) )
displayName: Publish deployables artifacts
# upload extension to Open VSIX Gallery (only possible if this is not a PR from a fork)
- task: PowerShell@2
displayName: Upload vsix to Open VSIX Gallery
condition: >-
and(
succeeded(),
ne(variables['system.pullrequest.isfork'], true),
eq(variables['System.PullRequest.PullRequestId'], '')
)
continueOnError: true
inputs:
targetType: 'inline'
script: |
$artifactsCollection = @("./*VS2022.Extension.vsix") | %{ Get-ChildItem -File . -Filter $_ -Recurse}
(new-object Net.WebClient).DownloadString("https://raw.github.com/madskristensen/ExtensionScripts/master/AppVeyor/vsix.ps1") | iex
foreach($file in $artifactsCollection)
{
"Uploading VSIX package to Open VSIX Gallery..." | Write-Host
Vsix-PublishToGallery $file
}
# create or update GitHub release
- task: GithubRelease@1
condition: >-
and(
succeeded(),
eq(variables['System.PullRequest.PullRequestId'], ''),
not(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
)
displayName: Create/Update GitHub release
inputs:
gitHubConnection: 'github.com_nano-$(System.TeamProject)'
tagSource: userSpecifiedTag
tag: v$(VS2022_Build.BUILD_VERSION)
title: '.NET nanoFramework VS Extension v$(VS2022_Build.BUILD_VERSION)'
releaseNotesSource: inline
releaseNotesInline: 'Check the [changelog](https://github.com/nanoframework/nf-Visual-Studio-extension/blob/$(Build.SourceBranchName)/CHANGELOG-VS2022.md).<br><br><h4>Install from Open VSIX Gallery development feed.</h4><br>The following Visual Studio Extension is available for install from this release:<br><br>:package: [.NET nanoFramework VS2022 Extension](http://vsixgallery.com/extension/bf694e17-fa5f-4877-9317-6d3664b2689a)'
assets: '$(Build.ArtifactStagingDirectory)/**/*.vsix'
assetUploadMode: replace
isDraft: true
isPreRelease: true
addChangeLog: false
# create or update GitHub release ON tags from release or main branches
- task: GithubRelease@1
condition: >-
and(
succeeded(),
startsWith(variables['Build.SourceBranch'], 'refs/tags/v'),
contains(variables['Build.SourceBranch'], 'vs2022'),
or(
eq(variables['Build.SourceBranchName'], 'main'),
contains(variables['Build.SourceBranchName'], 'release')
)
)
displayName: Create/Update GitHub stable release
inputs:
action: edit
gitHubConnection: 'github.com_nano-$(System.TeamProject)'
tagSource: userSpecifiedTag
tag: v$(VS2022_Build.BUILD_VERSION)
title: '.NET nanoFramework VS Extension v$(VS2022_Build.BUILD_VERSION)'
releaseNotesSource: inline
releaseNotesInline: 'Check the [changelog](https://github.com/nanoframework/nf-Visual-Studio-extension/blob/$(Build.SourceBranchName)/CHANGELOG-VS2022.md).<br><br><h4>Install from Visual Studio Marketplace.</h4><br>The following Visual Studio Extension is available for install from this release:<br><br>:package: [.NET nanoFramework VS2022 Extension](https://marketplace.visualstudio.com/items?itemName=nanoframework.nanoFramework-VS2022-Extension)'
assets: '$(Build.ArtifactStagingDirectory)/**/*.vsix'
assetUploadMode: replace
isPreRelease: false
addChangeLog: false
#################################
- job: Generate_Changelog
dependsOn:
- VS2019
- VS2022
condition: >-
and(
startsWith(variables['Build.SourceBranch'], 'refs/tags/v'),
succeeded('VS2019'),
succeeded('VS2022')
)
variables:
GO_BuildVS2019: $[ dependencies.Get_Build_Options.outputs['BuildOptions.BUILD_VS2019'] ]
MY_VS2019_VERSION: $[ dependencies.VS2019.outputs['VS2019_Build.BUILD_VERSION'] ]
GO_BuildVS202: $[ dependencies.Get_Build_Options.outputs['BuildOptions.BUILD_VS2022'] ]
MY_VS2022_VERSION: $[ dependencies.VS2022.outputs['VS2022_Build.BUILD_VERSION'] ]
pool:
vmImage: 'windows-latest'
steps:
- checkout: self
fetchDepth: 10
- script: |
git config --global user.email 'nanoframework@outlook.com'
git config --global user.name 'nfbot'
displayName: Setup git identity
- task: UseRubyVersion@0
condition: >-
and(
succeeded(),
eq(variables['System.PullRequest.PullRequestId'], '')
)
displayName: Setup Ruby
inputs:
versionSpec: '= 3.0'
addToPath: true
# install github_changelog_generator
- powershell: |
gem install github_changelog_generator --quiet --no-document
condition: succeeded()
displayName: Install github_changelog_generator
# generate VS2019 change log
- powershell: |
# need to call it passing both cache options with full path otherwise it won't work
github_changelog_generator --token $(GitHubToken) --cache-log $env:AGENT_TEMPDIRECTORY\github-changelog-logger.log --cache-file $env:AGENT_TEMPDIRECTORY\github-changelog-http-cache --since-tag v1.1.0.101-VS2019 --output CHANGELOG-VS2019.md
condition: >-
and(
succeeded(),
startsWith(variables['Build.SourceBranch'], 'refs/tags/v2019')
)
displayName: Generate VS2019 change log
# generate VS2022 change log
- powershell: |
# need to call it passing both cache options with full path otherwise it won't work
github_changelog_generator --token $(GitHubToken) --cache-log $env:AGENT_TEMPDIRECTORY\github-changelog-logger.log --cache-file $env:AGENT_TEMPDIRECTORY\github-changelog-http-cache --since-tag v2019.8.0.7 --output CHANGELOG-VS2022.md
condition: >-
and(
succeeded(),
startsWith(variables['Build.SourceBranch'], 'refs/tags/v2022')
)
displayName: Generate VS2022 change log
# copy change logs to artifacts directory
- task: CopyFiles@1
condition: succeeded()
displayName: Collecting deployable artifacts
inputs:
sourceFolder: $(Build.SourcesDirectory)
Contents: |
**\CHANGELOG-VS2019.md
**\CHANGELOG-VS2022.md
TargetFolder: '$(Build.ArtifactStagingDirectory)'
flattenFolders: true
# publish artifacts (only possible if this is not a PR originated on a fork)
- task: PublishBuildArtifacts@1
condition: succeeded()
displayName: Publish deployables artifacts
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: deployables
ArtifactType: Container
# commit changelogs
- task: PowerShell@2
condition: succeeded()
displayName: Commit VS2019 changelog
inputs:
targetType: 'inline'
script: |
git add CHANGELOG-VS2019.md
git add CHANGELOG-VS2022.md
# check if there is anything to commit
$anythingToCommit = git status --porcelain
if($anythingToCommit -ne $null)
{
Write-Host "Committing changelogs"
git commit -m "Update CHANGELOGs" -m"***NO_CI***"
}
# push changelogs to GitHub repo
- task: PowerShell@2
displayName: Push changelogs to GitHub
condition: succeeded()
inputs:
targetType: 'inline'
script: |
# check if there is anything to push
$anythingToPush = git log --branches --not --remotes
if($anythingToPush -ne $null)
{
Write-Host "Pushing changelogs"
git config user.email 'nanoframework@outlook.com'
git config user.name 'nfbot'
# compute authorization header in format "AUTHORIZATION: basic 'encoded token'"
# 'encoded token' is the Base64 of the string "nfbot:personal-token"
$auth = "basic $([System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("nfbot:$(GitHubToken)"))))"
git -c http.extraheader="AUTHORIZATION: $auth" push origin "HEAD:$(Build.SourceBranchName)"
}
##################################
# report build failure to Discord
- job: Report_Build_Failure
dependsOn:
- VS2019
- VS2022
condition: >-
or(
failed('VS2019'),
failed('VS2022')
)
pool:
vmImage: 'windows-latest'
steps:
- checkout: self
fetchDepth: 1
# step from template @ nf-tools repo
# report error
- template: azure-pipelines-templates/discord-webhook.yml@templates
parameters:
status: 'failure'
webhookUrl: '$(DiscordWebhook)'
message: ''
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/nanoframework/nf-Visual-Studio-extension.git
git@gitee.com:nanoframework/nf-Visual-Studio-extension.git
nanoframework
nf-Visual-Studio-extension
nf-Visual-Studio-extension
develop

搜索帮助