Skip to content

refactor(workflow): simplify version handling and add force re-trigger flag#1

Merged
HeyItsGilbert merged 2 commits into
mainfrom
refactor/publish-module-version-handling
May 30, 2026
Merged

refactor(workflow): simplify version handling and add force re-trigger flag#1
HeyItsGilbert merged 2 commits into
mainfrom
refactor/publish-module-version-handling

Conversation

@HeyItsGilbert
Copy link
Copy Markdown
Owner

Summary

  • Removes isPrerelease input — prerelease is now inferred from whether a suffix is present in the reconciled version string
  • inputs.version with a suffix (e.g. 1.2.3-beta) now overrides both the version number and PSData.Prerelease; a bare version (e.g. 1.2.3) means stable release even if the manifest carries a prerelease suffix
  • Adds inputs.force boolean to bypass the PSGallery existence check — for re-triggering a failed publish job when create_release already succeeded (pattern: force=true, create_release=false, publish=true)
  • Removes $versionForChangelog dead code

Decision context

docs/adr/0001-force-flag-and-inferred-prerelease.md records the trade-offs, including the two rejected alternatives (per-job re-run, separate dispatch workflow).

Test plan

  • Trigger workflow on a module repo with no inputs — verify stable publish path unchanged
  • Trigger with version: "1.2.3-beta" — verify suffix overrides manifest PSData.Prerelease
  • Trigger with version: "1.2.3" on a module whose manifest has a prerelease suffix — verify stable release published
  • Simulate failed publish (expired secret): trigger with force=true, create_release=false, publish=true — verify only publish job runs
  • Trigger with dry_run=true — verify no actual publish occurs

🤖 Generated with Claude Code

…r flag

- Remove isPrerelease input; infer from suffix presence after manifest/input reconciliation
- inputs.version with suffix now overrides PSData.Prerelease; bare version = stable release
- Add inputs.force to bypass PSGallery existence check for failed-job re-triggers
- Remove $versionForChangelog dead code

Re-trigger pattern for a failed publish: force=true, create_release=false, publish=true

See docs/adr/0001-force-flag-and-inferred-prerelease.md for decision context.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit 63cfb8e.

Removed push and pull_request triggers from CI workflow.
@HeyItsGilbert HeyItsGilbert merged commit 01babcc into main May 30, 2026
@HeyItsGilbert HeyItsGilbert deleted the refactor/publish-module-version-handling branch May 30, 2026 15:43
HeyItsGilbert added a commit to HeyItsGilbert/ChocoLogParse that referenced this pull request May 30, 2026
Adds full dispatch input surface (`version`, `force`, `dry_run`,
`create_release`, `publish`) aligned with HeyItsGilbert/.github#1.

Re-trigger pattern for a failed publish: `force=true,
create_release=false, publish=true`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
HeyItsGilbert added a commit to HeyItsGilbert/Gatekeeper that referenced this pull request May 30, 2026
…sions (#81)

@
Aligns with HeyItsGilbert/.github#1.

- Removes `isPrerelease` — the reusable workflow now infers prerelease
from `PSData.Prerelease` in the manifest
- Adds `force` to bypass the PSGallery existence check when
re-triggering a failed job
- Normalises `create_release`/`publish` expressions to
`github.event_name != workflow_dispatch || inputs.X`

Re-trigger pattern: `force=true, create_release=false, publish=true`

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant