Improve CI and LuaRocks manual publishing workflows#14
Merged
Conversation
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.
Summary
This PR improves the GitHub Actions workflows for LuaSF by making CI more focused and LuaRocks publishing safer.
The main goal is to avoid accidental package publishing while keeping a clean manual workflow for validating and publishing LuaRocks releases.
What changed
CI workflow
Updated
.github/workflows/ci.ymlto:workflow_dispatch.master.The CI workflow now focuses on relevant project files such as:
src/**spec/**examples/**LuaSF.luaLuaStat.lua*.rockspec.github/workflows/ci.ymlThis avoids triggering CI for unrelated documentation-only changes unless the workflow is manually executed.
LuaRocks publishing workflow
Updated
.github/workflows/publish-luarocks.ymlto keep publishing manual and protected.The workflow now supports:
workflow_dispatch.rockspecinput.publishboolean input.publish = true.luarocks lint.luarocks make.require("luasf")require("LuaSF")require("LuaStat")Safety improvements
Publishing to LuaRocks is now protected by several safeguards:
publish = false.publish = true.luarocks-productionenvironment for an additional approval layer.LUAROCKS_API_KEYGitHub Actions secret.Why this matters
LuaSF is now published on LuaRocks, so publishing must be handled carefully.
This PR ensures that normal development activity, documentation changes, or merges into
masterdo not accidentally publish a new LuaRocks package.How to validate
Run CI manually from GitHub Actions:
Validate the LuaRocks package without publishing:
Publish only when intentionally needed:
When
publish = true, GitHub should require approval through theluarocks-productionenvironment before uploading to LuaRocks.Notes
This PR only updates CI/CD and publishing workflows.
It does not change LuaSF library code, tests, examples, documentation, or public API behavior.