diff --git a/.pipelines/vscode-powershell-Official.yml b/.pipelines/vscode-powershell-Official.yml index 035d04c2ea..f54b832d0c 100644 --- a/.pipelines/vscode-powershell-Official.yml +++ b/.pipelines/vscode-powershell-Official.yml @@ -27,16 +27,12 @@ resources: type: git name: OneBranch.Pipelines/GovernedTemplates ref: refs/heads/main - - repository: PowerShellEditorServices - type: git - name: PowerShellEditorServices - ref: release pipelines: - pipeline: PowerShellEditorServices-Official source: PowerShellEditorServices-Official trigger: branches: - - release + - main extends: # https://aka.ms/obpipelines/templates @@ -126,8 +122,6 @@ extends: ob_outputDirectory: $(Build.SourcesDirectory)/out skipComponentGovernanceDetection: true steps: - - checkout: self - - checkout: PowerShellEditorServices - task: UseNode@1 displayName: Use Node 18.x inputs: @@ -135,7 +129,7 @@ extends: - task: npmAuthenticate@0 displayName: Authenticate NPM with Azure Artifacts inputs: - workingFile: vscode-powershell/.npmrc + workingFile: .npmrc - task: UseDotNet@2 displayName: Use .NET 8.x SDK inputs: @@ -145,10 +139,23 @@ extends: displayName: Install PSResources inputs: pwsh: true - filePath: vscode-powershell/tools/installPSResources.ps1 + filePath: tools/installPSResources.ps1 + - task: DownloadPipelineArtifact@2 + displayName: Download PowerShellEditorServices + inputs: + source: specific + project: PowerShellCore + definition: 2905 + specificBuildWithTriggering: true + artifact: drop_release_github + itemPattern: PowerShellEditorServices.zip + - task: ExtractFiles@1 + displayName: Extract PowerShellEditorServices module + inputs: + archiveFilePatterns: $(Pipeline.Workspace)/PowerShellEditorServices.zip + destinationFolder: $(Build.SourcesDirectory)/modules - pwsh: Invoke-Build Test -Configuration $(BuildConfiguration) displayName: Run tests - workingDirectory: vscode-powershell - stage: release dependsOn: build variables: @@ -171,7 +178,7 @@ extends: inputs: gitHubConnection: GitHub repositoryName: PowerShell/vscode-powershell - assets: $(drop)/vscode-powershell-$(vsixVersion).vsix + assets: $(drop)/powershell-$(vsixVersion).vsix tagSource: userSpecifiedTag tag: v$(version) isDraft: true @@ -214,7 +221,7 @@ extends: '--pat' '$(token)' '--packagePath' - '$(drop)/vscode-powershell-$(vsixVersion).vsix' + '$(drop)/powershell-$(vsixVersion).vsix' if ([bool]::Parse('$(prerelease)')) { '--pre-release' } ) npm run publish -- @publishArgs diff --git a/docs/development.md b/docs/development.md index b800ec00e0..5cac5bcf9e 100644 --- a/docs/development.md +++ b/docs/development.md @@ -52,20 +52,24 @@ For more information on contributing snippets please read our These are the current steps for creating a release for both the editor services and the extension. Azure DevOps access is restricted to Microsoft employees and is used to sign and validate the produced binaries before publishing on behalf -of Microsoft. +of Microsoft. Assume `origin` is GitHub and `ado` is Azure DevOps. ```powershell cd ./PowerShellEditorServices git checkout -B release ./tools/updateVersion.ps1 -Version "4.0.0" -Changes "Major release!" +git push --force-with-lease origin +git push ado HEAD:main cd ../vscode-powershell git checkout -B release ./tools/updateVersion.ps1 -Version "2024.4.0" -Changes "Major release!" +git push --force-with-lease origin +git push ado HEAD:main ``` 1. Amend changelogs as necessary. -2. Push release branches to ADO and GitHub. +2. Push `release` branches to GitHub and to Azure DevOps `main` branch. 3. Download and test assets! 4. Publish draft releases and merge (don't squash!) branches. 5. Permit pipeline to publish to marketplace. @@ -74,6 +78,10 @@ If rolling from pre-release to release, do not change the version of PowerShell Editor Services between a pre-release and the subsequent release! We only need to release the extension. +The Azure DevOps pipelines have to build off `main` branch for _reasons_, +but we still want to use PRs. Hence pushing `release` to `main` and then +merging (not squashing nor rebasing) those PRs so the commit stays the same. + ### Versioning For both our repositories we use Git tags in the form `vX.Y.Z` to mark the releases in the