Skip to content
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
12fbf54
Rename Get-Settings workflow to Plan and add Resolve-PSModuleVersion …
MariusStorhaug May 22, 2026
f62e29f
Rewire Process-PSModule workflow jobs to use the Plan job
MariusStorhaug May 22, 2026
821cd03
Forward ModuleVersion and ModulePrerelease into Build-PSModule
MariusStorhaug May 22, 2026
9461604
Drop version-calculation inputs from Publish-Module
MariusStorhaug May 22, 2026
4072d6e
Document the Plan job and the release-asset upload guarantee
MariusStorhaug May 22, 2026
7d80faa
Document version resolution algorithm in Plan section
MariusStorhaug May 22, 2026
5dd0c7e
Refactor permissions formatting in workflow files for consistency
MariusStorhaug May 24, 2026
0b0b7a3
Update Resolve-PSModuleVersion to v1.0.1
MariusStorhaug May 24, 2026
7385a29
Update Build-PSModule to v4.1
MariusStorhaug May 24, 2026
df0f1c4
Fall back to 0.0.0 when no ModuleVersion is resolved
MariusStorhaug May 24, 2026
87cf094
Merge version outputs into Settings object; update README to be decla…
MariusStorhaug May 25, 2026
19b2789
Tighten Plan section: describe only what Plan does, not downstream ef…
MariusStorhaug May 25, 2026
3d17465
Fix Build module description: correct sequence, remove downstream com…
MariusStorhaug May 25, 2026
a0ebb46
Remove VSCode settings file to streamline project configuration
MariusStorhaug May 26, 2026
d5674cf
fix: repin Build-PSModule@v5.0.0 and Publish-PSModule@v3.0.0 to relea…
MariusStorhaug May 27, 2026
6f4d0ed
refactor: remove conditional check for Resolve-Version step
MariusStorhaug May 27, 2026
13e4ce6
fix: correct API key secret name to uppercase in workflow configuration
MariusStorhaug May 27, 2026
336fac6
Merge branch 'main' into feat/326-resolve-psmodule-version
MariusStorhaug May 27, 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
14 changes: 13 additions & 1 deletion .github/workflows/Build-Module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
description: Name of the artifact to upload.
required: false
default: module
ModuleVersion:
type: string
description: The Major.Minor.Patch version to stamp into the built manifest. Empty falls back to '999.0.0'.
required: false
default: ''
ModulePrerelease:
type: string
description: Optional prerelease tag to stamp into the built manifest.
required: false
default: ''

permissions:
contents: read # to checkout the repository
Expand All @@ -30,8 +40,10 @@
fetch-depth: 0

- name: Build module
uses: PSModule/Build-PSModule@345728124d201f371a8b0f1aacb98f89000a06dc # v4.0.14
uses: PSModule/Build-PSModule@v4.1

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow or composite action Medium

Unpinned 3rd party Action 'Build-Module' step
Uses Step
uses 'PSModule/Build-PSModule' with ref 'v4.1', not a pinned commit hash
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
with:
Name: ${{ fromJson(inputs.Settings).Name }}
Version: ${{ inputs.ModuleVersion }}
Prerelease: ${{ inputs.ModulePrerelease }}
ArtifactName: ${{ inputs.ArtifactName }}
WorkingDirectory: ${{ fromJson(inputs.Settings).WorkingDirectory }}
78 changes: 0 additions & 78 deletions .github/workflows/Get-Settings.yml

This file was deleted.

119 changes: 119 additions & 0 deletions .github/workflows/Plan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: Plan

# The Plan job is the single decision point for the workflow.
# It runs two steps:
# 1. Get-PSModuleSettings - loads and resolves configuration
# 2. Resolve-PSModuleVersion - calculates the next version from settings + PR labels
# All downstream jobs consume the Settings JSON and the resolved version outputs from this job.

on:
workflow_call:
inputs:
SettingsPath:
type: string
description: The path to the settings file.
required: false
Debug:
type: boolean
description: Enable debug output.
required: false
default: false
Verbose:
type: boolean
description: Enable verbose output.
required: false
default: false
Version:
type: string
description: Specifies the version of the GitHub module to be installed. The value must be an exact version.
required: false
default: ''
Prerelease:
type: boolean
description: Whether to use a prerelease version of the 'GitHub' module.
required: false
default: false
WorkingDirectory:
type: string
description: The path to the root of the repo.
required: false
default: '.'
ImportantFilePatterns:
type: string
description: |
Newline-separated list of regex patterns that identify important files.
Changes matching these patterns trigger build, test, and publish stages.
When set, fully replaces the defaults (^src/ and ^README\.md$).
required: false
default: |
^src/
^README\.md$

outputs:
Settings:
description: The complete settings object including test suites.
value: ${{ jobs.Plan.outputs.Settings }}
ModuleVersion:
description: The Major.Minor.Patch part of the next version.
value: ${{ jobs.Plan.outputs.ModuleVersion }}
ModulePrerelease:
description: The prerelease tag, empty string when not a prerelease.
value: ${{ jobs.Plan.outputs.ModulePrerelease }}
ModuleFullVersion:
description: The full version string including prefix and prerelease tag (for example v1.4.0).
value: ${{ jobs.Plan.outputs.ModuleFullVersion }}
ReleaseType:
description: The release type - Release, Prerelease, or None.
value: ${{ jobs.Plan.outputs.ReleaseType }}
CreateRelease:
description: 'true when a release/prerelease should actually be created.'
value: ${{ jobs.Plan.outputs.CreateRelease }}

permissions:
contents: read # to checkout the repo
pull-requests: write # to add labels / comments to PRs

jobs:
Plan:
name: Plan
runs-on: ubuntu-latest
outputs:
Settings: ${{ steps.Get-Settings.outputs.Settings }}
ModuleVersion: ${{ steps.Resolve-Version.outputs.Version }}
ModulePrerelease: ${{ steps.Resolve-Version.outputs.Prerelease }}
ModuleFullVersion: ${{ steps.Resolve-Version.outputs.FullVersion }}
ReleaseType: ${{ steps.Resolve-Version.outputs.ReleaseType }}
CreateRelease: ${{ steps.Resolve-Version.outputs.CreateRelease }}
steps:
- name: Checkout Code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
fetch-depth: 0

- name: Get-Settings
uses: PSModule/Get-PSModuleSettings@1e3d156786c56e6fbd839a1ba5ab21ff8858090e # v1.5.0
id: Get-Settings
with:
SettingsPath: ${{ inputs.SettingsPath }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}
WorkingDirectory: ${{ inputs.WorkingDirectory }}
ImportantFilePatterns: ${{ inputs.ImportantFilePatterns }}

- name: Resolve-Version
# Resolve only when the workflow is going to create a release/prerelease.
if: fromJson(steps.Get-Settings.outputs.Settings).Publish.Module.ReleaseType != 'None'
uses: PSModule/Resolve-PSModuleVersion@65b7cb026cb3414943778473fd82ee6cf4f0363e # v1.0.1
id: Resolve-Version
env:
GH_TOKEN: ${{ github.token }}
with:
Settings: ${{ steps.Get-Settings.outputs.Settings }}
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}
WorkingDirectory: ${{ inputs.WorkingDirectory }}
13 changes: 2 additions & 11 deletions .github/workflows/Publish-Module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
required: true

permissions:
contents: write # to checkout the repo and create releases
contents: write # to checkout the repo, create releases, and upload release artifacts
pull-requests: write # to comment on PRs

jobs:
Expand All @@ -30,7 +30,7 @@
fetch-depth: 0

- name: Publish module
uses: PSModule/Publish-PSModule@8917aed588dae1bd1aa2873b1caec1c50c20d255 # v2.2.4
uses: PSModule/Publish-PSModule@main

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow or composite action Medium

Unpinned 3rd party Action 'Publish-Module' step
Uses Step
uses 'PSModule/Publish-PSModule' with ref 'main', not a pinned commit hash
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
env:
GH_TOKEN: ${{ github.token }}
with:
Expand All @@ -39,15 +39,6 @@
APIKey: ${{ secrets.APIKEY }}
Comment thread
MariusStorhaug marked this conversation as resolved.
WhatIf: ${{ github.repository == 'PSModule/Process-PSModule' }}
AutoCleanup: ${{ fromJson(inputs.Settings).Publish.Module.AutoCleanup }}
AutoPatching: ${{ fromJson(inputs.Settings).Publish.Module.AutoPatching }}
DatePrereleaseFormat: ${{ fromJson(inputs.Settings).Publish.Module.DatePrereleaseFormat }}
IgnoreLabels: ${{ fromJson(inputs.Settings).Publish.Module.IgnoreLabels }}
ReleaseType: ${{ fromJson(inputs.Settings).Publish.Module.ReleaseType }}
IncrementalPrerelease: ${{ fromJson(inputs.Settings).Publish.Module.IncrementalPrerelease }}
MajorLabels: ${{ fromJson(inputs.Settings).Publish.Module.MajorLabels }}
MinorLabels: ${{ fromJson(inputs.Settings).Publish.Module.MinorLabels }}
PatchLabels: ${{ fromJson(inputs.Settings).Publish.Module.PatchLabels }}
VersionPrefix: ${{ fromJson(inputs.Settings).Publish.Module.VersionPrefix }}
UsePRTitleAsReleaseName: ${{ fromJson(inputs.Settings).Publish.Module.UsePRTitleAsReleaseName }}
UsePRBodyAsReleaseNotes: ${{ fromJson(inputs.Settings).Publish.Module.UsePRBodyAsReleaseNotes }}
UsePRTitleAsNotesHeading: ${{ fromJson(inputs.Settings).Publish.Module.UsePRTitleAsNotesHeading }}
Expand Down
Loading
Loading