feat(build): add GitHub release publishing with vendored zip asset - #90
Merged
Conversation
- 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
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.ps1now supports-PublishToGitHubwith-GitHubAPIKey/-GitHubAPIPath,-GitHubOwner,-GitHubRepository,-Prerelease, and-GitHubSha.Locksmith2/zip and uploaded to the release.-GitHubShaand$env:GITHUB_SHAare both empty..github/workflows/publish.ymlusessecrets.GITHUB_TOKENwithpermissions: contents: writeand triggers on workflow file changes.CimCmdletsfromRequiredModulesandExternalModuleDependencies(Windows-only; auto-loads whenGet-CimInstanceis called).Tests/Build/Build-Module.Tests.ps1toTests/Build/Invoke-LS2PostBuildPublish.Tests.ps1and adds GitHub release coverage.Docs/ADR/0004-github-release-publishing-strategy.mddocumenting the decision.Closes the github-release-publishing feature tracked under
.scratch/github-release-publishing/.