diff --git a/.vscode/settings.json b/.vscode/settings.json index d9a7591e73..0502b17bd4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,19 @@ { + "powershell.codeFormatting.autoCorrectAliases": true, + "powershell.codeFormatting.preset": "OTBS", + "powershell.codeFormatting.trimWhitespaceAroundPipe": true, + "powershell.codeFormatting.useCorrectCasing": true, "powershell.codeFormatting.newLineAfterCloseBrace": false, - "powershell.codeFormatting.pipelineIndentationStyle": "IncreaseIndentationForFirstPipeline" + "powershell.codeFormatting.pipelineIndentationStyle": "IncreaseIndentationForFirstPipeline", + "powershell.codeFormatting.alignPropertyValuePairs": true, + "powershell.codeFormatting.ignoreOneLineBlock": true, + "powershell.codeFormatting.newLineAfterOpenBrace": true, + "powershell.codeFormatting.openBraceOnSameLine": true, + "powershell.codeFormatting.whitespaceAfterSeparator": true, + "powershell.codeFormatting.whitespaceAroundOperator": true, + "powershell.codeFormatting.whitespaceBeforeOpenBrace": true, + "powershell.codeFormatting.whitespaceBeforeOpenParen": true, + "powershell.codeFormatting.whitespaceBetweenParameters": false, + "powershell.codeFormatting.whitespaceInsideBrace": true, + "powershell.codeFormatting.addWhitespaceAroundPipe": true } \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 97a6ff8dbf..6d2994d239 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,12 +1,8 @@ -# Starter pipeline -# Start with a minimal pipeline that you can customize to build and deploy your code. -# Add steps that build, run tests, deploy, and more: -# https://aka.ms/yaml - trigger: branches: include: - main + - release pool: vmImage: 'windows-latest' @@ -25,6 +21,10 @@ steps: .\Build.ps1 displayName: "Build Script" +- pwsh: | + $tag = "v$((Get-Date).ToString(`"yy.MM.dd.HHmm`"))" + Write-Host "##vso[task.setvariable variable=ReleaseTagValue]$tag" + - task: EsrpCodeSigning@1 inputs: ConnectedServiceName: 'CSS Exchange Code Sign' @@ -65,3 +65,17 @@ steps: SessionTimeout: '60' MaxConcurrency: '50' MaxRetryAttempts: '5' + +- task: GitHubRelease@0 + displayName: 'Create GitHub Release' + condition: and(succeeded(), ne (variables['Build.Reason'], 'PullRequest'), eq(variables['Build.SourceBranch'], 'refs/heads/release')) + inputs: + gitHubConnection: 'GitHub Release' + repositoryName: microsoft/CSS-Exchange + action: create + tagSource: manual + tagPattern: 'v[0-9].[0-9].[0-9].[0-9]' + tag: $(ReleaseTagValue) + title: $(ReleaseTagValue) + assets: dist\*.ps1 + addChangeLog: true \ No newline at end of file