From a448fede6b04a1333b1ae924233dc179f2f3b947 Mon Sep 17 00:00:00 2001 From: Gilbert Sanchez Date: Thu, 17 Sep 2026 17:13:29 -0700 Subject: [PATCH 1/2] build: adopt PowerShellOrg reusable CI workflow Add .github/workflows/ci.yml calling PowerShellOrg/.github/.github/workflows/powershell-ci.yml@main, which runs ./build.ps1 -Task Test -Bootstrap across Windows PowerShell 5.1, Windows PowerShell 7, Linux PowerShell 7, and macOS PowerShell 7, plus changelog/spell/PSScriptAnalyzer lint checks. pull_request trigger has no branch filter (rather than main-only) so CI runs on every PR in this stack, including intermediate PRs whose base is a feature branch rather than main. Depends on the earlier lowercase tests/ rename in this stack so the reusable workflow's ./tests/out/testResults.xml artifact path resolves on the case-sensitive Linux runner. CI on this PR: Linux/macOS/Windows(PS7) pass. Windows PowerShell 5.1 and the changelog-lint step fail on pre-existing issues this workflow is the first to catch -- tracked as #498 and #499. Refs #488 (do not auto-close; blocked on #498 and #499 for full green CI across all 4 required environments) --- .github/workflows/ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..2c41d4ef --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,14 @@ +name: CI + +on: + push: + branches: + - main + tags: + - '*' + pull_request: {} + workflow_dispatch: + +jobs: + ci: + uses: PowerShellOrg/.github/.github/workflows/powershell-ci.yml@main From 5aa5f220e4d6e6856a30fe4afdcb1abe9acbe48a Mon Sep 17 00:00:00 2001 From: Gilbert Sanchez Date: Thu, 17 Sep 2026 17:23:59 -0700 Subject: [PATCH 2/2] build: add PowerShellOrg publish and stale-issue reusable workflows Mirrors PSDepend's org-standard workflow set: - publish.yml: calls PowerShellOrg/.github/.github/workflows/powershell-release.yml@main on push to main (and manual dispatch with version/force/dry_run/ create_release/publish overrides) to tag, release, and publish to PSGallery. - stale.yml: daily actions/stale@v9 sweep for inactive issues/PRs, same thresholds and labels as PSDepend. --- .github/workflows/publish.yml | 44 +++++++++++++++++++++++++++++++++++ .github/workflows/stale.yml | 21 +++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..ace622fd --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,44 @@ +name: Publish Module +on: + push: + branches: + - main + workflow_dispatch: + inputs: + version: + description: "The version to publish. Leave empty to use the version in the module manifest." + required: false + type: string + force: + description: "If true, bypass the PSGallery version existence check. Use when re-triggering a failed publish job (pattern: force=true, create_release=false, publish=true)." + required: false + type: boolean + default: false + dry_run: + description: "If true, skip actual publishing and just validate the workflow logic." + required: false + type: boolean + default: false + create_release: + description: "If false, skip creating the GitHub release and tag." + required: false + type: boolean + default: true + publish: + description: "If false, skip publishing to PowerShell Gallery." + required: false + type: boolean + default: true +permissions: + contents: write +jobs: + publish: + name: Publish Module + uses: PowerShellOrg/.github/.github/workflows/powershell-release.yml@main + with: + version: ${{ inputs.version || '' }} + force: ${{ inputs.force || false }} + dry_run: ${{ inputs.dry_run || false }} + create_release: ${{ github.event_name != 'workflow_dispatch' || inputs.create_release }} + publish: ${{ github.event_name != 'workflow_dispatch' || inputs.publish }} + secrets: inherit diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 00000000..c48941a0 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,21 @@ +name: Mark stale issues and PRs + +on: + schedule: + - cron: '0 8 * * *' + workflow_dispatch: + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + stale-issue-message: 'This issue has had no activity for 60 days. It will be closed in 30 days unless there is new activity or a maintainer removes the stale label.' + stale-pr-message: 'This PR has had no activity for 60 days. It will be closed in 30 days unless there is new activity or a maintainer removes the stale label.' + close-issue-message: 'Closing due to inactivity. Please re-open if this is still relevant against the current version.' + days-before-stale: 60 + days-before-close: 30 + stale-issue-label: 'status: stale' + stale-pr-label: 'status: stale' + exempt-issue-labels: 'priority: high'