Repository navigation
Release-GHRepository requires a release label or a configured bump #109
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
Open
+6,241
−493
Open
Changes from all commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
ee24a8d
Add canonical release decision resolver
MariusStorhaug 8071946
Enforce namespaced release decisions
MariusStorhaug d7b5359
Run release checks on label transitions
MariusStorhaug c17172a
Document the v3 release label contract
MariusStorhaug 8e4578b
Cover the complete release label matrix
MariusStorhaug 0a8c09a
Keep release checks safe for dry runs and forks
MariusStorhaug a2ec196
Restrict prereleases to open pull requests
MariusStorhaug efc2b38
Scope release concurrency to each pull request
MariusStorhaug be73e64
Document the trusted release trigger
MariusStorhaug a1c6728
Resolve unlabeled releases from DefaultBump
MariusStorhaug 9f13a19
Expose DefaultBump in the action contract
MariusStorhaug a3b76e0
Document DefaultBump precedence and migration
MariusStorhaug fd25814
Preserve terminating native command failures
MariusStorhaug 2c19496
Apply the patch default consistently
MariusStorhaug 9d0b79c
Target prereleases at the pull request head
MariusStorhaug e3d91ea
Render concrete dry-run comment commands
MariusStorhaug eb79780
Fail clearly on invalid prerelease context
MariusStorhaug 0265cf5
Use the release prerelease qualifier
MariusStorhaug 2f55615
Document the release prerelease qualifier
MariusStorhaug bae3d66
Restrict cleanup to matching prereleases
MariusStorhaug ed54c8f
Resolve effective settings without losing explicit overrides
MariusStorhaug a71f7d1
Exercise the release caller without repository mutations
MariusStorhaug 8fac168
Add explicit caller overrides and release-decision provenance
MariusStorhaug 89b7766
Preserve valid release contexts and queue stable publication
MariusStorhaug b8767c4
Match cleanup identities exactly and keep skip version-free
MariusStorhaug 4007dbe
Read canonical release settings and reject legacy paths
MariusStorhaug 03e20b8
Document the canonical release settings reader
MariusStorhaug 3e1b28e
Separate the filename migration from owned release decisions
MariusStorhaug 37d7539
Use named inputs for explicit release-setting overrides
MariusStorhaug 47202d7
Explain inherited named action settings
MariusStorhaug 2fc7c58
Rename the settings path input to SettingsFilePath
MariusStorhaug d190349
Exercise an existing caller settings file in the hosted test
MariusStorhaug 9e1c370
Use file-backed release standards and natural input omission
MariusStorhaug a28d7a6
Keep automatic bump policy in the settings file
MariusStorhaug 714b801
Keep discoverable release standards in action metadata
MariusStorhaug 7ab87bc
Resolve startup settings before GitHub-Script
MariusStorhaug 1040867
Exercise resolved startup inputs in the read-only caller
MariusStorhaug 290d112
Tag stable releases at the merged commit
MariusStorhaug 4aa6e36
Keep release publishing on pull request events
MariusStorhaug bc4449b
Explain the trust gate for fork prereleases
MariusStorhaug 48a4319
Preserve pull request workflow guidance from main
MariusStorhaug 6eba7b7
Keep release action guidance evergreen
MariusStorhaug 85a43b0
Document the release-note handoff
MariusStorhaug 4a8ce5f
Use namespaced release label terminology
MariusStorhaug fa4b27e
Clarify the release upgrade and limit publisher permissions
MariusStorhaug 6cf328b
Require an explicit release decision by default (#118)
MariusStorhaug 00b61f1
Provision release labels before publishing prereleases
MariusStorhaug 15b4e64
Pin reviewed release jobs to Ubuntu 24.04
MariusStorhaug a9288a7
Bind release plans to the exact source and decision
MariusStorhaug 269e72e
Run release planning and CI before stable publication
MariusStorhaug 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
Some comments aren't visible on the classic Files Changed page.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,113 @@ | ||
| name: Action-Test | ||
|
|
||
| run-name: "Action-Test - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}" | ||
| run-name: "Action-Test - [${{ github.ref_name }}] by @${{ github.actor }}" | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| workflow_call: | ||
| schedule: | ||
| - cron: '0 0 * * *' | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| group: ${{ github.workflow }}-tests-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| permissions: {} | ||
|
|
||
| jobs: | ||
| UnitTest: | ||
| name: Pester 6.1 | ||
| runs-on: ubuntu-24.04 | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - name: Checkout repo | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| ref: ${{ github.sha }} | ||
| persist-credentials: false | ||
|
|
||
| - name: Test release decisions | ||
| uses: PSModule/Invoke-Pester@4ff33199141fdf22568990b6107fe3148ae93a1c # v5.1.0 | ||
| with: | ||
| Path: tests | ||
| Version: 6.1.0 | ||
| Prescript: | | ||
| Install-PSResource -Name powershell-yaml -Version '[0.4.12]' -TrustRepository -Repository PSGallery | ||
| Install-PSResource -Name PSSemVer -Version '[1.1.10]' -TrustRepository -Repository PSGallery | ||
|
|
||
| ActionTestDefault: | ||
| name: Action-Test - [Default] | ||
| runs-on: ubuntu-latest | ||
| runs-on: ubuntu-24.04 | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| steps: | ||
| - name: Checkout repo | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| ref: ${{ github.sha }} | ||
| persist-credentials: false | ||
|
|
||
| - name: Action-Test | ||
| uses: ./ | ||
| with: | ||
| DefaultBump: patch | ||
| WhatIf: true | ||
|
|
||
| - name: Prepare caller settings | ||
| id: caller-settings | ||
| shell: pwsh | ||
| run: | | ||
| $ErrorActionPreference = 'Stop' | ||
| $settingsFilePath = Join-Path -Path $env:RUNNER_TEMP -ChildPath 'release-caller.settings.yml' | ||
| @' | ||
| DefaultBump: major | ||
| AutoCleanup: true | ||
| CreateMajorTag: false | ||
| DatePrereleaseFormat: yyyyMMdd | ||
| VersionPrefix: v | ||
| WhatIf: false | ||
| Debug: true | ||
| Verbose: true | ||
| WorkingDirectory: .github | ||
| Version: '[0.43.1]' | ||
| Prerelease: true | ||
| '@ | Set-Content -LiteralPath $settingsFilePath | ||
| "path=$settingsFilePath" | Add-Content -LiteralPath $env:GITHUB_OUTPUT | ||
|
|
||
| - name: Action-Test - Repository policy | ||
| uses: ./ | ||
| with: | ||
| SettingsFilePath: ${{ steps.caller-settings.outputs.path }} | ||
| AutoCleanup: false | ||
| DatePrereleaseFormat: '' | ||
| VersionPrefix: '' | ||
| Debug: '' | ||
| Verbose: '' | ||
| WorkingDirectory: '' | ||
| Version: '' | ||
| Prerelease: '' | ||
| WhatIf: true | ||
|
|
||
| - name: Action-Test - Explicit standard-value override | ||
| uses: ./ | ||
| with: | ||
| SettingsFilePath: ${{ steps.caller-settings.outputs.path }} | ||
| DefaultBump: patch | ||
| AutoCleanup: false | ||
| DatePrereleaseFormat: '' | ||
| VersionPrefix: '' | ||
| Debug: false | ||
| Verbose: false | ||
| WorkingDirectory: ${{ github.workspace }} | ||
| Version: '[0.43.1]' | ||
| Prerelease: false | ||
| WhatIf: true | ||
|
|
||
| - name: Remove caller settings | ||
| if: ${{ always() && steps.caller-settings.outputs.path != '' }} | ||
| shell: pwsh | ||
| env: | ||
| CALLER_SETTINGS_PATH: ${{ steps.caller-settings.outputs.path }} | ||
| run: Remove-Item -LiteralPath $env:CALLER_SETTINGS_PATH -ErrorAction Stop |
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,82 @@ | ||
| name: Release decision | ||
|
|
||
| on: | ||
| workflow_call: | ||
| outputs: | ||
| Decision: | ||
| description: The release or skip decision. | ||
| value: ${{ jobs.ReleaseDecision.outputs.Decision }} | ||
| ReleaseVersion: | ||
| description: The calculated version, if the decision is release. | ||
| value: ${{ jobs.ReleaseDecision.outputs.ReleaseVersion }} | ||
| ReleasePlan: | ||
| description: The source-bound handoff to Publish, if the decision is release. | ||
| value: ${{ jobs.ReleaseDecision.outputs.ReleasePlan }} | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
|
|
||
| jobs: | ||
| ReleaseDecision: | ||
| name: Release decision | ||
| runs-on: ubuntu-24.04 | ||
| outputs: | ||
| Decision: ${{ steps.calculate.outputs.Decision }} | ||
| ReleaseVersion: ${{ steps.calculate.outputs.ReleaseVersion }} | ||
| ReleasePlan: ${{ steps.calculate.outputs.ReleasePlan }} | ||
| steps: | ||
| - name: Check out the revision under test | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| ref: ${{ github.sha }} | ||
| persist-credentials: false | ||
|
|
||
| - name: Verify the pull request snapshot | ||
| if: ${{ github.event_name == 'pull_request' }} | ||
| shell: pwsh | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: $null = & '.\src\Test-ReleaseDecisionContext.ps1' | ||
|
|
||
| - name: Calculate the release decision | ||
| id: calculate | ||
| uses: ./ | ||
| env: | ||
| PSMODULE_AUTO_RELEASE_CHECK_PUBLISHER: 'true' | ||
| with: | ||
| Mode: calculate | ||
|
|
||
| - name: Recheck and report the decision | ||
| shell: pwsh | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| RELEASE_DECISION: ${{ steps.calculate.outputs.Decision }} | ||
| RELEASE_VERSION: ${{ steps.calculate.outputs.ReleaseVersion }} | ||
| RELEASE_PLAN: ${{ steps.calculate.outputs.ReleasePlan }} | ||
| RELEASE_BUMP_SOURCE: ${{ steps.calculate.outputs.BumpSource }} | ||
| run: | | ||
| $ErrorActionPreference = 'Stop' | ||
| $decision = $env:RELEASE_DECISION | ||
| $version = $env:RELEASE_VERSION | ||
| $source = $env:RELEASE_BUMP_SOURCE | ||
| $hasVersion = -not [string]::IsNullOrWhiteSpace($version) | ||
| $hasPlan = -not [string]::IsNullOrWhiteSpace($env:RELEASE_PLAN) | ||
| if ($decision -cnotin @('release', 'skip') -or -not $source -or | ||
| ($decision -ceq 'release') -ne $hasVersion -or $hasVersion -ne $hasPlan) { | ||
| throw 'Calculate did not return a complete release decision.' | ||
| } | ||
| $summary = [ordered]@{ | ||
| SourceSha = $env:GITHUB_SHA | ||
| Decision = $decision | ||
| BumpSource = $source | ||
| Version = $version | ||
| } | ||
| if ($env:GITHUB_EVENT_NAME -ceq 'pull_request') { | ||
| $checked = & '.\src\Test-ReleaseDecisionContext.ps1' | ||
| $summary.PullRequest = $checked.Number | ||
| $summary.BaseBranch = $checked.BaseRef | ||
| $summary.BaseSha = $checked.BaseSha | ||
| $summary.HeadSha = $checked.HeadSha | ||
| } | ||
| $summary | ConvertTo-Json |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.