-
Notifications
You must be signed in to change notification settings - Fork 234
Automate entire release process #1528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
25e17bb
Setup publish stage in release pipeline
andyleejordan 4792107
Move `azurePipelinesBuild.ps1` to `tools` folder
andyleejordan 4da48af
Use pipeline artifacts instead of build artifacts
andyleejordan 148f423
Stop using PowerShell daily for CI
andyleejordan 85eae62
Clean up `ci-general.yml` template
andyleejordan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,26 @@ | ||
parameters: | ||
pwsh: true | ||
- name: pwsh | ||
type: boolean | ||
default: true | ||
|
||
steps: | ||
- powershell: | | ||
Write-Host "Installing PowerShell Daily..." | ||
- pwsh: '$PSVersionTable' | ||
displayName: PowerShell version | ||
|
||
# Use `AGENT_TEMPDIRECTORY` to make sure the downloaded PowerShell is cleaned up. | ||
$powerShellPath = Join-Path -Path $env:AGENT_TEMPDIRECTORY -ChildPath 'powershell' | ||
Invoke-WebRequest -Uri https://aka.ms/install-powershell.ps1 -OutFile ./install-powershell.ps1 | ||
- task: PowerShell@2 | ||
displayName: Build and test | ||
inputs: | ||
filePath: tools/azurePipelinesBuild.ps1 | ||
pwsh: ${{ parameters.pwsh }} | ||
|
||
./install-powershell.ps1 -Destination $powerShellPath -Daily | ||
- publish: module | ||
artifact: PowerShellEditorServices-Build-$(System.JobId) | ||
displayName: Publish unsigned pipeline artifacts | ||
condition: succeededOrFailed() | ||
|
||
# Using `prependpath` to update the PATH just for this build. | ||
Write-Host "##vso[task.prependpath]$powerShellPath" | ||
displayName: Install PowerShell Daily | ||
continueOnError: true | ||
|
||
- pwsh: '$PSVersionTable' | ||
displayName: Display PowerShell version information | ||
|
||
- pwsh: Write-Host "##vso[build.updatebuildnumber]$env:BUILD_SOURCEBRANCHNAME-$env:BUILD_SOURCEVERSION-$((get-date).ToString("yyyyMMddhhmmss"))" | ||
displayName: Set Build Name for Non-PR | ||
condition: ne(variables['Build.Reason'], 'PullRequest') | ||
- task: PowerShell@2 | ||
inputs: | ||
filePath: scripts/azurePipelinesBuild.ps1 | ||
pwsh: ${{ parameters.pwsh }} | ||
- task: PublishTestResults@2 | ||
inputs: | ||
testRunner: VSTest | ||
testResultsFiles: '**/*.trx' | ||
condition: succeededOrFailed() | ||
- task: PublishTestResults@2 | ||
inputs: | ||
testRunner: NUnit | ||
testResultsFiles: '**/TestResults.xml' | ||
condition: succeededOrFailed() | ||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
ArtifactName: PowerShellEditorServices-CI | ||
PathtoPublish: '$(Build.ArtifactStagingDirectory)' | ||
condition: succeededOrFailed() | ||
- task: PublishTestResults@2 | ||
displayName: Publish test results | ||
inputs: | ||
testRunner: VSTest | ||
testResultsFiles: '**/*.trx' | ||
condition: succeededOrFailed() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
steps: | ||
- checkout: self | ||
- checkout: vscode-powershell | ||
- download: current | ||
artifact: PowerShellEditorServices | ||
displayName: Download signed pipeline artifacts | ||
- pwsh: | | ||
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted | Out-Null | ||
Install-Module -Name PowerShellForGitHub -Scope CurrentUser -Force -Confirm:$false | ||
Import-Module '$(Build.SourcesDirectory)/vscode-powershell/tools/ReleaseTools.psm1' | ||
Set-GitHubConfiguration -SuppressTelemetryReminder | ||
$password = ConvertTo-SecureString -String '$(GitHubToken)' -AsPlainText -Force | ||
Set-GitHubAuthentication -Credential (New-Object System.Management.Automation.PSCredential ("token", $password)) | ||
New-DraftRelease -RepositoryName PowerShellEditorServices -Assets '$(Pipeline.Workspace)/PowerShellEditorServices/PowerShellEditorServices.zip' | ||
displayName: Drafting a GitHub Release |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could have sworn there was a newer one than this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is, actually. Another time.