ci: delegate to PowerShellOrg reusable workflows#184
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the repository’s GitHub Actions configuration to PowerShellOrg reusable workflows and aligns the repo’s psake tasks with what those workflows expect (including a dedicated Analyze task and publish API key wiring).
Changes:
- Replace the existing multi-job CI workflow with a single call to
PowerShellOrg/.github’spowershell-ci.yml. - Add a tag-triggered (and manually triggerable) publish workflow delegating to
powershell-release.yml. - Add a new
Analyzepsake task that runs PSScriptAnalyzer on the staged module output; wire publish API key fromPSGALLERY_API_KEY.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| psakeFile.ps1 | Adds Analyze task and maps $env:PSGALLERY_API_KEY into PowerShellBuild publish preferences. |
| .github/workflows/ci.yml | Simplifies CI to a single reusable workflow invocation. |
| .github/workflows/publish.yml | Adds release workflow that delegates publishing/release steps to a reusable workflow. |
Comments suppressed due to low confidence (1)
.github/workflows/ci.yml:25
- This change removes the in-repo step that published JUnit test results as PR check runs (previously via
publish-unit-test-result-action). If that reporting is still desired, ensurepowershell-ci.ymlprovides equivalent test result publishing, or add it back in this workflow.
jobs:
ci:
uses: PowerShellOrg/.github/.github/workflows/powershell-ci.yml@main
permissions:
contents: read
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- CI.yml now calls powershell-ci.yml@main (PS 5.1 + 7.x, all platforms, installs deps and runs Init/Test/Analyze directly via Invoke-psake) - publish.yml added: triggers on v* tags, calls powershell-release.yml@main (Init → Test → Analyze → Build → Publish → GitHub Release) - psakeFile.ps1: add Analyze task (required by both reusable workflows) and wire $PSBPreference.Publish.ApiKey from $env:PSGALLERY_API_KEY Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2c1a6d4 to
52cd558
Compare
Test Results 3 files - 1 60 suites - 20 1m 57s ⏱️ -24s Results for commit 52cd558. ± Comparison against base commit 61060f3. This pull request removes 411 tests. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
uses:call toPowerShellOrg/.github/.github/workflows/powershell-ci.yml@main— covers PS 5.1 and 7.x on Windows/Linux/macOS, installs deps, and runs Init/Test/Analyze viaInvoke-psakev*tag push, delegates topowershell-release.yml@main(Init → Test → Analyze → Build → Publish → GitHub Release); requiresPSGALLERY_API_KEYsecret set in repo settingsAnalyzetask (runsInvoke-ScriptAnalyzeron staged output, fails on Error severity); wired$PSBPreference.Publish.ApiKeyfrom$env:PSGALLERY_API_KEYTest plan
PSGALLERY_API_KEYsecret is set in repo settings before tagging a releasepublish.ymlviaworkflow_dispatchon a pre-release branch🤖 Generated with Claude Code