Skip to content

feat(build): add GitHub release publishing with vendored zip asset - #90

Merged
jakehildreth merged 7 commits into
mainfrom
feature/add-github-release-packaging
Jul 23, 2026
Merged

feat(build): add GitHub release publishing with vendored zip asset#90
jakehildreth merged 7 commits into
mainfrom
feature/add-github-release-packaging

Conversation

@jakehildreth

Copy link
Copy Markdown
Owner

Adds GitHub Release publishing to the Locksmith2 build so that every PSGallery publish also creates a matching GitHub release with a vendored zip asset.

  • Build/Invoke-LS2PostBuildPublish.ps1 now supports -PublishToGitHub with -GitHubAPIKey / -GitHubAPIPath, -GitHubOwner, -GitHubRepository, -Prerelease, and -GitHubSha.
  • The vendored unpacked artefact is compressed into a top-level Locksmith2/ zip and uploaded to the release.
  • GitHub release creation is CI-only: it fails loudly when -GitHubSha and $env:GITHUB_SHA are both empty.
  • .github/workflows/publish.yml uses secrets.GITHUB_TOKEN with permissions: contents: write and triggers on workflow file changes.
  • Removes PSPublishModule packed artefact generation; the GitHub asset is built on demand from the vendored unpacked artefact.
  • Removes CimCmdlets from RequiredModules and ExternalModuleDependencies (Windows-only; auto-loads when Get-CimInstance is called).
  • Renames Tests/Build/Build-Module.Tests.ps1 to Tests/Build/Invoke-LS2PostBuildPublish.Tests.ps1 and adds GitHub release coverage.
  • Adds Docs/ADR/0004-github-release-publishing-strategy.md documenting the decision.

Closes the github-release-publishing feature tracked under .scratch/github-release-publishing/.

- Add GitHub release creation to Invoke-LS2PostBuildPublish.ps1
  - New -PublishToGitHub, -GitHubAPIKey, -GitHubAPIPath, -GitHubOwner, -GitHubRepository, -Prerelease, -GitHubSha parameters
  - Vendored unpacked artefact is compressed into a top-level Locksmith2/ zip and uploaded to the release
  - CI-only: fails loudly when -GitHubSha and $env:GITHUB_SHA are both empty
- Update .github/workflows/publish.yml to pass -PublishToGitHub and GITHUB_TOKEN in release and prerelease steps
- Remove PSPublishModule packed artefact generation; GitHub asset is built on demand from the vendored unpacked artefact
- Remove CimCmdlets from RequiredModules and ExternalModuleDependencies (Windows-only; auto-loads when Get-CimInstance is called)
- Rename Tests/Build/Build-Module.Tests.ps1 to Tests/Build/Invoke-LS2PostBuildPublish.Tests.ps1 and add GitHub release coverage
- Add Docs/ADR/0004-github-release-publishing-strategy.md documenting the decision
- Update .github/workflows/publish.yml to use secrets.LOCKSMITH2_TOKEN instead of secrets.GITHUB_TOKEN
- Pass the token to Build-Module.ps1 via the LOCKSMITH2_TOKEN environment variable
…shing

- Switch workflow from secrets.LOCKSMITH2_TOKEN to secrets.GITHUB_TOKEN
- Add permissions: contents: write to build-and-publish job so GitHub Actions can create releases and upload assets
- Remove references to the LOCKSMITH2_TOKEN environment variable in release and prerelease steps
- Add '.github/workflows/publish.yml' to the push paths trigger in .github/workflows/publish.yml
@jakehildreth
jakehildreth merged commit 7aef21a into main Jul 23, 2026
1 check passed
@jakehildreth
jakehildreth deleted the feature/add-github-release-packaging branch July 23, 2026 12:50
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