Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
bb6850d
ci: reuse reviewed five-module routing and pinned Pester runner
stadub Nov 11, 2026
d6d997e
feat: gate immutable releases and Gallery issue completion on verifie…
stadub Nov 11, 2026
6e54d9a
docs: document release rollout gates and remaining owner setup
stadub Nov 11, 2026
f993c5b
ci: expand validation to all eight PowerShell modules
stadub Nov 11, 2026
26fbe30
release: use latest release sources and clarify deployment setup
stadub Nov 11, 2026
a257a88
release: standardize all Gallery package paths on module out directories
stadub Nov 11, 2026
4d3e91c
release: select separate Gallery credentials through verified module …
stadub Nov 11, 2026
919d13f
release: generate reproducible out packages from reviewed source
stadub Nov 11, 2026
a17b6e2
ci: allow immutable release candidates to run read-only hosted valida…
stadub Nov 11, 2026
c5413b3
ci: validate source-only follow-ups without committing development pa…
stadub Nov 11, 2026
4855606
release: preserve explicit module and package licenses during generat…
stadub Nov 11, 2026
58c0fbf
release: record tested Base64String 1.3.0 snapshot and exact deployme…
stadub Nov 11, 2026
2f7daae
feat: add secure account-mapped Gallery key setup and rotation helper
stadub Nov 11, 2026
d3fa589
ci: validate component source fixes without mixing module code into a…
stadub Nov 11, 2026
ddae454
Merge remote-tracking branch 'origin/master' into ci/release-pipeline
stadub Nov 11, 2026
06ee2de
Pin and record maintained CI sources while testing changed snapshots
stadub Nov 11, 2026
24cf07b
Record verified all-module repair matrix and current rollout gates
stadub Nov 11, 2026
ffbb518
Remove Azure pipelines and obsolete CI badges after disconnecting leg…
stadub Nov 11, 2026
09313f1
Record post-disconnection checks and preserved repository scope
stadub Nov 11, 2026
6bb426b
Record approved component repairs integrated into maintained branches
stadub Nov 12, 2026
14a1cb2
Select release module and version while pinning the reviewed snapshot…
stadub Nov 12, 2026
64d3d28
Select one Git executable in cross-platform release selection fixtures
stadub Nov 12, 2026
84126ae
Preserve the Actions shell exit code after expected Git failure tests
stadub Nov 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 131 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: PowerShell module validation

on:
push:
branches: [master, '**/develop', '**/release/**', 'fix/**', 'ci/**']
pull_request:
branches: [master, '**/develop', '**/release/**']
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
plan:
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
matrix: ${{ steps.select.outputs.matrix }}
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
fetch-depth: 0
- name: Test CI automation offline
shell: pwsh
run: |
./tests/Test-CiSelection.ps1
./tests/Test-CiSources.ps1
./tests/Test-CiRunner.ps1
./tests/Test-CiStructure.ps1
./tests/Test-ReleaseSelection.ps1
./tests/Test-GalleryAutomation.ps1
./tests/Test-GalleryKeySetup.ps1
./tests/Test-ReleaseOutput.ps1
./tests/Test-ReleaseEvidence.ps1
./tests/Test-GalleryVerification.ps1
node ./tests/Test-IssueCompletion.cjs
if ($LASTEXITCODE -ne 0) { throw 'Issue completion tests failed' }
node ./tests/Test-WorkflowSafety.cjs
if ($LASTEXITCODE -ne 0) { throw 'Workflow safety tests failed' }
node ./tests/Test-ReleaseCreation.cjs
if ($LASTEXITCODE -ne 0) { throw 'Release creation tests failed' }
- id: select
name: Select modules and immutable source snapshots
shell: pwsh
env:
TARGET_BRANCH: ${{ github.base_ref || github.ref_name }}
CURRENT_SHA: ${{ github.sha }}
PR_BASE: ${{ github.event.pull_request.base.sha }}
PUSH_BASE: ${{ github.event.before }}
REF_NAME: ${{ github.ref_name }}
run: |
$checkedOut = git rev-parse HEAD
if ($LASTEXITCODE -ne 0 -or $checkedOut -cne $env:CURRENT_SHA) { throw 'Automation checkout does not match workflow commit' }
$baseCandidate = if ($env:PR_BASE) { $env:PR_BASE } elseif ($env:REF_NAME -eq 'master' -and $env:PUSH_BASE -match '^[0-9a-f]{40}$' -and $env:PUSH_BASE -ne ('0' * 40)) { $env:PUSH_BASE } else { 'origin/master' }
$base = git merge-base HEAD $baseCandidate
if ($LASTEXITCODE -ne 0) { throw 'Cannot determine source comparison base' }
$changed = @(git diff --name-only -z $base HEAD)
if ($LASTEXITCODE -ne 0) { throw 'Cannot inspect source changes' }
$paths = @((($changed -join "`n").Split([char]0, [StringSplitOptions]::RemoveEmptyEntries)))
$remote = @(git ls-remote origin 'refs/heads/*')
if ($LASTEXITCODE -ne 0) { throw 'Cannot resolve maintained module refs' }
$refs = @{}
foreach ($line in $remote) {
if ($line -match '^([0-9a-f]{40})\s+refs/heads/(.+)$') { $refs[$Matches[2]] = $Matches[1] }
}
$json = ./scripts/ci/Resolve-CiSources.ps1 -Branch $env:TARGET_BRANCH -CurrentSha $env:CURRENT_SHA -RemoteRefs $refs -ChangedPaths $paths
'Module | Source ref | Commit | Mode' >> $env:GITHUB_STEP_SUMMARY
'--- | --- | --- | ---' >> $env:GITHUB_STEP_SUMMARY
foreach ($entry in (($json | ConvertFrom-Json).include | Sort-Object module -Unique)) {
"$($entry.module) | $($entry.source_ref) | $($entry.source_sha) | $($entry.source_mode)" >> $env:GITHUB_STEP_SUMMARY
}

test:
needs: plan
name: ${{ matrix.module }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.plan.outputs.matrix) }}
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- name: Check out the exact module source
uses: actions/checkout@v7.0.1
with:
ref: ${{ matrix.source_sha }}
path: module-source
persist-credentials: false
- name: Test release snapshot selection on Windows
if: ${{ matrix.module == 'Base64String' && matrix.os == 'windows-latest' }}
shell: pwsh
run: ./tests/Test-ReleaseSelection.ps1
- name: Run module checks
shell: pwsh
env:
MODULE: ${{ matrix.module }}
SOURCE_SHA: ${{ matrix.source_sha }}
SOURCE_REF: ${{ matrix.source_ref }}
SOURCE_MODE: ${{ matrix.source_mode }}
AUTOMATION_SHA: ${{ github.sha }}
run: |
New-Item ./module-source/TestResults -ItemType Directory -Force | Out-Null
@{module=$env:MODULE; sourceSha=$env:SOURCE_SHA; sourceRef=$env:SOURCE_REF; sourceMode=$env:SOURCE_MODE; automationSha=$env:AUTOMATION_SHA} | ConvertTo-Json | Set-Content ./module-source/TestResults/source-identity.json
./scripts/ci/Invoke-ModuleTests.ps1 -Module $env:MODULE -SourceRoot ./module-source
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7.0.2
with:
name: tests-${{ matrix.module }}-${{ matrix.os }}
path: module-source/TestResults/
if-no-files-found: ignore

status:
name: CI status
if: always()
needs: [plan, test]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Require successful planning and module checks
env:
PLAN_RESULT: ${{ needs.plan.result }}
TEST_RESULT: ${{ needs.test.result }}
run: test "$PLAN_RESULT" = success && test "$TEST_RESULT" = success
263 changes: 263 additions & 0 deletions .github/workflows/release-gallery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,263 @@
name: Tested release and protected Gallery deployment
on:
workflow_dispatch:
inputs:
module:
description: Module to release
type: choice
required: true
options: [Bookmarks, 7zip-Archive, Currency-Conv, Base64String, Pipe]
version:
description: Prepared version number (for example, 1.3.0)
type: string
required: true
create_release:
description: Also create the GitHub release during a dry-run
type: boolean
default: false
dry_run:
description: Validate only; uncheck to publish to PowerShell Gallery
type: boolean
default: true
permissions:
contents: read
concurrency:
group: release-gallery-${{ inputs.module }}
cancel-in-progress: false
jobs:
package:
runs-on: windows-latest
timeout-minutes: 20
outputs:
source_sha: ${{ steps.snapshot.outputs.sha }}
steps:
- uses: actions/checkout@v7.0.1
with:
path: automation
persist-credentials: false
- name: Validate request
shell: pwsh
env:
VERSION: ${{ inputs.version }}
MUTATE: ${{ inputs.create_release || !inputs.dry_run }}
REF: ${{ github.ref }}
run: |
if ($env:VERSION -notmatch '^\d+\.\d+\.\d+(\.\d+)?$') { throw 'Stable version required' }
if ($env:MUTATE -eq 'true' -and $env:REF -ne 'refs/heads/master') { throw 'Mutations require master' }
- name: Resolve the selected module's reviewed release snapshot
id: snapshot
shell: pwsh
env:
MODULE: ${{ inputs.module }}
VERSION: ${{ inputs.version }}
run: ./automation/scripts/gallery/Resolve-ReleaseSnapshot.ps1 -Module $env:MODULE -Version $env:VERSION -RepositoryRoot ./automation
- uses: actions/checkout@v7.0.1
with:
ref: ${{ steps.snapshot.outputs.sha }}
path: source
fetch-depth: 0
persist-credentials: false
- name: Require configured release ancestry and matching source/package
shell: pwsh
env:
MODULE: ${{ inputs.module }}
SHA: ${{ steps.snapshot.outputs.sha }}
VERSION: ${{ inputs.version }}
run: |
$config = ./automation/scripts/gallery/Get-ReleaseConfig.ps1 -Module $env:MODULE
git -C source merge-base --is-ancestor $env:SHA "origin/$($config.ReleaseBranch)"
if ($LASTEXITCODE -ne 0) { throw 'Snapshot is not on the configured release branch' }
./automation/scripts/gallery/Build-GalleryPackage.ps1 -Module $env:MODULE -SourceRoot ./source -OutputRoot ./stage -ExpectedVersion $env:VERSION
./automation/scripts/gallery/Assert-SourcePackage.ps1 -Module $env:MODULE -SourceRoot ./source -PackageRoot ./stage
./automation/scripts/gallery/Package-Evidence.ps1 -Module $env:MODULE -Version $env:VERSION -SourceSha $env:SHA -PackageRoot ./stage -EvidencePath ./stage/evidence.json
./automation/scripts/gallery/New-ReleaseOutput.ps1 -Module $env:MODULE -SourceRoot ./source -OutputRoot ./generated -ExpectedVersion $env:VERSION
./automation/scripts/gallery/Build-GalleryPackage.ps1 -Module $env:MODULE -SourceRoot ./generated -OutputRoot ./reproduced -ExpectedVersion $env:VERSION
./automation/scripts/gallery/Package-Evidence.ps1 -Module $env:MODULE -Version $env:VERSION -SourceSha $env:SHA -PackageRoot ./reproduced -EvidencePath ./stage/evidence.json -Verify
- uses: actions/upload-artifact@v7.0.2
with:
name: gallery-package
path: stage/
if-no-files-found: error

test:
needs: package
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
shell: pwsh
- os: windows-latest
shell: powershell
- os: ubuntu-latest
shell: pwsh
- os: macos-latest
shell: pwsh
runs-on: ${{ matrix.os }}
timeout-minutes: 25
steps:
- uses: actions/checkout@v7.0.1
with:
path: automation
persist-credentials: false
- uses: actions/checkout@v7.0.1
with:
ref: ${{ needs.package.outputs.source_sha }}
path: source
persist-credentials: false
- uses: actions/download-artifact@v8.0.2
with:
name: gallery-package
path: stage
- name: Test source and installed package
if: ${{ matrix.shell == 'pwsh' && (inputs.module != '7zip-Archive' || matrix.os == 'windows-latest') }}
shell: pwsh
env:
MODULE: ${{ inputs.module }}
VERSION: ${{ inputs.version }}
SHA: ${{ needs.package.outputs.source_sha }}
run: |
./automation/scripts/gallery/Package-Evidence.ps1 -Module $env:MODULE -Version $env:VERSION -SourceSha $env:SHA -PackageRoot ./stage -EvidencePath ./stage/evidence.json -Verify
./automation/scripts/gallery/Test-ReleasePackage.ps1 -Module $env:MODULE -SourceRoot ./source -PackageRoot ./stage -ExpectedVersion $env:VERSION
- name: Test source and installed package on Windows PowerShell 5.1
if: ${{ matrix.shell == 'powershell' }}
shell: powershell
env:
MODULE: ${{ inputs.module }}
VERSION: ${{ inputs.version }}
SHA: ${{ needs.package.outputs.source_sha }}
run: |
./automation/scripts/gallery/Package-Evidence.ps1 -Module $env:MODULE -Version $env:VERSION -SourceSha $env:SHA -PackageRoot ./stage -EvidencePath ./stage/evidence.json -Verify
./automation/scripts/gallery/Test-ReleasePackage.ps1 -Module $env:MODULE -SourceRoot ./source -PackageRoot ./stage -ExpectedVersion $env:VERSION
- uses: actions/upload-artifact@v7.0.2
if: always()
with:
name: release-tests-${{ matrix.os }}-${{ matrix.shell }}
path: source/TestResults/*.xml
if-no-files-found: ignore

release:
needs: [package, test]
if: ${{ github.ref == 'refs/heads/master' && (inputs.create_release || !inputs.dry_run) }}
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: actions/download-artifact@v8.0.2
with:
name: gallery-package
path: stage
- name: Create immutable version release or verify existing release
env:
GH_TOKEN: ${{ github.token }}
MODULE: ${{ inputs.module }}
VERSION: ${{ inputs.version }}
SHA: ${{ needs.package.outputs.source_sha }}
run: node scripts/gallery/Create-Release.cjs

publish:
needs: [package, test, release]
if: ${{ !inputs.dry_run && github.ref == 'refs/heads/master' }}
runs-on: windows-latest
timeout-minutes: 15
environment: powershell-gallery
outputs:
published: ${{ steps.upload.outputs.published }}
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: actions/download-artifact@v8.0.2
with:
name: gallery-package
path: stage
- name: Select configured Gallery account (no credentials)
id: account
shell: pwsh
env:
MODULE: ${{ inputs.module }}
run: |
$config = ./scripts/gallery/Get-ReleaseConfig.ps1 -Module $env:MODULE
"name=$($config.GalleryAccount)" >> $env:GITHUB_OUTPUT
"secret=$($config.GallerySecret)" >> $env:GITHUB_OUTPUT
"Gallery route: $env:MODULE -> $($config.GalleryAccount) ($($config.GallerySecret))" >> $env:GITHUB_STEP_SUMMARY
- name: Publish tested package
id: upload
shell: pwsh
env:
PSGALLERY_API_KEY: ${{ secrets[steps.account.outputs.secret] }}
PSGALLERY_ACCOUNT: ${{ steps.account.outputs.name }}
MODULE: ${{ inputs.module }}
VERSION: ${{ inputs.version }}
SOURCE_SHA: ${{ needs.package.outputs.source_sha }}
run: |
./scripts/gallery/Package-Evidence.ps1 -Module $env:MODULE -Version $env:VERSION -SourceSha $env:SOURCE_SHA -PackageRoot ./stage -EvidencePath ./stage/evidence.json -Verify
./scripts/gallery/Publish-GalleryPackage.ps1 -Module $env:MODULE -PackageRoot ./stage -ExpectedVersion $env:VERSION
'published=true' >> $env:GITHUB_OUTPUT

verify:
needs: [package, publish]
if: ${{ !inputs.dry_run && needs.publish.result == 'success' && needs.publish.outputs.published == 'true' }}
runs-on: windows-latest
timeout-minutes: 20
outputs:
verified: ${{ steps.verify.outputs.verified }}
steps:
- uses: actions/checkout@v7.0.1
with:
path: automation
persist-credentials: false
- uses: actions/checkout@v7.0.1
with:
ref: ${{ needs.package.outputs.source_sha }}
path: source
persist-credentials: false
- uses: actions/download-artifact@v8.0.2
with:
name: gallery-package
path: stage
- name: Verify exact Gallery bytes and installed behavior without credentials
id: verify
shell: pwsh
env:
MODULE: ${{ inputs.module }}
VERSION: ${{ inputs.version }}
SHA: ${{ needs.package.outputs.source_sha }}
run: |
./automation/scripts/gallery/Verify-GalleryPackage.ps1 -Module $env:MODULE -Version $env:VERSION -SourceSha $env:SHA -SourceRoot ./source -EvidencePath ./stage/evidence.json -OutputRoot ./download
Copy-Item ./stage/evidence.json ./verified.json
'verified=true' >> $env:GITHUB_OUTPUT
- uses: actions/upload-artifact@v7.0.2
with:
name: gallery-verification
path: verified.json
if-no-files-found: error

complete-issues:
needs: [package, publish, verify]
if: ${{ !inputs.dry_run && github.ref == 'refs/heads/master' && needs.publish.result == 'success' && needs.publish.outputs.published == 'true' && needs.verify.result == 'success' && needs.verify.outputs.verified == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
issues: write
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: actions/github-script@v8
env:
MODULE: ${{ inputs.module }}
VERSION: ${{ inputs.version }}
SHA: ${{ needs.package.outputs.source_sha }}
with:
script: |
const {complete} = require('./scripts/gallery/Complete-Issues.cjs');
await complete({github, context,
mapping: require('./scripts/gallery/issue-map.json'),
identity: {repository: process.env.GITHUB_REPOSITORY, module: process.env.MODULE,
version: process.env.VERSION, sourceSha: process.env.SHA}});
Loading
Loading