Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat: add reusable CI and release workflows#5

Merged
psjamesp merged 1 commit into
pr/04-templatesPowerShellOrg/.github:pr/04-templatesfrom
pr/05-workflowsPowerShellOrg/.github:pr/05-workflowsCopy head branch name to clipboard
Apr 21, 2026
Merged

feat: add reusable CI and release workflows#5
psjamesp merged 1 commit into
pr/04-templatesPowerShellOrg/.github:pr/04-templatesfrom
pr/05-workflowsPowerShellOrg/.github:pr/05-workflowsCopy head branch name to clipboard

Conversation

@HeyItsGilbert

Copy link
Copy Markdown
Member

Stack position: 5 of 7

Two reusable workflow_call workflows. These are the shared CI/CD infrastructure that Plaster and PSDepend will adopt immediately after this PR merges.

What's in this PR

powershell-ci.yml (reusable):

  • Matrix: Windows/Ubuntu/macOS × PS 5.1 (Windows only) + PS 7.x = 4 legs total
  • NuGet provider bootstrap step for PS 5.1 before module install
  • Installs: psake, PowerShellBuild, PSScriptAnalyzer, Pester 5 (pinned to 5.0–5.99)
  • Fixed psake task sequence: InitTestAnalyze
  • Uploads test result artifacts per matrix leg (testResults.xml)

powershell-release.yml (reusable):

  • Inputs: module-name (required string), create-github-release (bool, default true)
  • Required secret: PSGALLERY_API_KEY
  • Runs full CI gate (Init → Test → Analyze) before Build → Publish
  • Creates GitHub Release with auto-generated notes via gh release create --generate-notes
  • Release runs on windows-latest only (publish from Windows for maximum compatibility)

Consuming repo usage:

# ci.yml
jobs:
  ci:
    uses: PowerShellOrg/.github/.github/workflows/powershell-ci.yml@main

# release.yml (tag-triggered)
jobs:
  release:
    uses: PowerShellOrg/.github/.github/workflows/powershell-release.yml@main
    with:
      module-name: PSDepend
    secrets:
      PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }}

Council questions

  1. Pester version pin (5.0–5.99): intentional — keeps us on Pester 5.x and excludes a hypothetical Pester 6 that might be breaking. Agree?
  2. Release runs Windows-only: Publish-Module is most reliable from Windows. Any objection?
  3. --generate-notes for GitHub Releases: this pulls from PR titles since last release. Only useful once PRs are the standard workflow. For the first release, maintainers should write notes manually. Should we document this caveat?
  4. Init task in CI: this assumes every repo has an Init psake task. If a repo doesn't define it, CI will fail. Is the org wiki the right place to document required task names, or should we add a REQUIRED_TASKS.md here?

Base: pr/04-templates — merge PRs 1–4 first.

powershell-ci.yml:
  - Matrix: windows/ubuntu/macos x PS5.1(Win only)/PS7.x
  - NuGet bootstrap step for PS 5.1
  - Fixed psake tasks: Init → Test → Analyze
  - Uploads test result artifacts per matrix leg

powershell-release.yml:
  - Inputs: module-name (required), create-github-release (default true)
  - Secret: PSGALLERY_API_KEY (required, scoped per-repo)
  - Full CI gate (Init → Test → Analyze) before Build → Publish
  - Creates GitHub Release with auto-generated notes via gh CLI
@psjamesp psjamesp merged commit d8cda25 into pr/04-templates Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.