From 960bfc17ff6b0f3b5884bf0d5f90976cd815c7a7 Mon Sep 17 00:00:00 2001 From: TJ Kolleh Date: Sat, 4 Apr 2026 20:28:44 -0400 Subject: [PATCH 1/6] chore(17): configure release-please to auto-bump version in lux.toml --- .release-please-manifest.json | 3 +++ release-please-config.json | 14 ++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 .release-please-manifest.json create mode 100644 release-please-config.json diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..ffb929a --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "1.12.1" +} \ No newline at end of file diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..cefbf33 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,14 @@ +{ + "packages": { + ".": { + "release-type": "simple", + "extra-files": [ + { + "type": "toml", + "path": "lux.toml", + "jsonpath": "$.version" + } + ] + } + } +} \ No newline at end of file From f73048e215940b86329bfe5167c1e6be082f7af6 Mon Sep 17 00:00:00 2001 From: TJ Kolleh Date: Sat, 4 Apr 2026 20:28:44 -0400 Subject: [PATCH 2/6] feat(17): enhance release workflow to build and publish artifacts --- .github/workflows/release-please.yml | 55 +++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 8033f75..214b7e9 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -16,6 +16,59 @@ jobs: runs-on: ubuntu-latest steps: - uses: googleapis/release-please-action@v4 + id: release with: token: ${{ secrets.PAT }} - release-type: simple + # release-type: simple is configured in release-please-config.json + + - name: Checkout repository + if: ${{ steps.release.outputs.release_created }} + uses: actions/checkout@v4 + with: + ref: ${{ steps.release.outputs.tag_name }} + + - name: Install System Dependencies + if: ${{ steps.release.outputs.release_created }} + run: | + sudo apt-get update -qq + sudo apt-get install -y -qq build-essential cmake luarocks + + - name: Install Lux + if: ${{ steps.release.outputs.release_created }} + uses: lumen-oss/gh-actions-lux@v1 + with: + version: 0.25.3 + + - name: Install just + if: ${{ steps.release.outputs.release_created }} + run: | + mkdir -p /tmp/just + curl -L https://github.com/casey/just/releases/download/1.48.1/just-1.48.1-x86_64-unknown-linux-musl.tar.gz -o /tmp/just/just.tar.gz + tar -xzf /tmp/just/just.tar.gz -C /tmp/just + sudo mv /tmp/just/just /usr/local/bin/ + rm -rf /tmp/just + + - name: Build Executable + if: ${{ steps.release.outputs.release_created }} + run: | + just build + sha256sum roda > roda.sha256 + + - name: Generate Rockspec + if: ${{ steps.release.outputs.release_created }} + run: | + lx generate-rockspec + + - name: Upload Release Artifacts + if: ${{ steps.release.outputs.release_created }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release upload ${{ steps.release.outputs.tag_name }} roda roda.sha256 *.rockspec + + - name: Publish to LuaRocks + if: ${{ steps.release.outputs.release_created }} + env: + LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }} + run: | + luarocks upload *.rockspec --api-key=${LUAROCKS_API_KEY} From 4e626b3f5d33f7c97942c235db44f28150782e7c Mon Sep 17 00:00:00 2001 From: TJ Kolleh Date: Sat, 4 Apr 2026 21:33:13 -0400 Subject: [PATCH 3/6] chore(17): add adaptive Lua version detection for cross-platform builds --- justfile | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/justfile b/justfile index bc82f25..3d8b947 100644 --- a/justfile +++ b/justfile @@ -37,12 +37,13 @@ set positional-arguments := true # Lua installation prefix (default: brew --prefix lua on macOS, /usr on other platforms) lua_prefix := env('LUA_PREFIX', if os() == "macos" { `brew --prefix lua` } else { "/usr" }) -# Lua version for development headers (default: 5.5) -lua_version := "5.5" +# Lua version for development headers (default: 5.5 on macOS, 5.4 on Linux) +lua_version := env('LUA_VERSION', if os() == "macos" { "5.5" } else { "5.4" }) # Include path for Lua development headers (override with LUA_INCLUDE env var) lua_include := env('LUA_INCLUDE', lua_prefix / ("include/lua" + lua_version)) -# Static Lua library (adjust path if using shared library) -lua_lib := lua_prefix / "lib/liblua.a" +# Static Lua library (default: unversioned name; override with LUA_LIB env var) +lua_lib_unversioned := lua_prefix / "lib/liblua.a" +lua_lib := env('LUA_LIB', lua_lib_unversioned) macos_version := if os() == "macos" { `sw_vers -productVersion | cut -d. -f1-2` } else { "" } build_dir := absolute_path(clean(env('BUILD_DIR', '.build'))) package_name := "roda" @@ -68,12 +69,12 @@ check-env: [doc("Format Lua files")] [group('dev')] fmt: - lx --lua-version 5.5 fmt + lx --lua-version {{lua_version}} fmt [doc("Lint Lua files")] [group('dev')] lint: - lx --lua-version 5.5 check + lx --lua-version {{lua_version}} check [doc("Lint for CI (Lua 5.4)")] [group('ci')] @@ -90,7 +91,7 @@ check: lint fmt [group('test')] test-unit: @echo "Running unit tests..." - lx --lua-version 5.5 --lua-dir {{ lua_prefix }} --variables "WITH_SHARED_LIBUV=OFF" test + lx --lua-version {{lua_version}} --lua-dir {{ lua_prefix }} --variables "WITH_SHARED_LIBUV=OFF" test [doc("Alias for test-unit")] [group('test')] @@ -110,7 +111,7 @@ ensure-deps: @echo "Ensuring dependencies are installed..." CFLAGS="-I{{ lua_include }} {{ if os() == 'macos' { '-mmacosx-version-min=' + macos_version } else { '' } }}" \ {{ if os() == 'macos' { 'MACOSX_DEPLOYMENT_TARGET=' + macos_version } else { '' } }} \ - lx --lua-version 5.5 --lua-dir {{ lua_prefix }} --variables "WITH_SHARED_LIBUV=OFF" build --only-deps --no-lock + lx --lua-version {{lua_version}} --lua-dir {{ lua_prefix }} --variables "WITH_SHARED_LIBUV=OFF" build --only-deps --no-lock [doc("Build the standalone executable")] [group('build')] @@ -209,7 +210,7 @@ test-perf: build install: CFLAGS="-I{{ lua_include }} {{ if os() == 'macos' { '-mmacosx-version-min=' + macos_version } else { '' } }}" \ {{ if os() == 'macos' { 'MACOSX_DEPLOYMENT_TARGET=' + macos_version } else { '' } }} \ - lx --lua-version 5.5 --lua-dir {{ lua_prefix }} --variables "WITH_SHARED_LIBUV=OFF" build --only-deps --no-lock + lx --lua-version {{lua_version}} --lua-dir {{ lua_prefix }} --variables "WITH_SHARED_LIBUV=OFF" build --only-deps --no-lock [doc("Run spinner directly without building (development mode)")] [group('dev')] @@ -237,7 +238,7 @@ release: all [group('release')] publish: release @echo "Publishing to LuaRocks..." - lx --lua-version 5.5 publish + lx --lua-version {{lua_version}} publish # --- Maintenance --- @@ -252,4 +253,4 @@ clean: [doc("Update lux dependencies")] [group('maintenance')] update: - lx --lua-version 5.5 update + lx --lua-version {{lua_version}} update From 41d4c8879aad7ce3a903b9a6f9183c1d2975a7a0 Mon Sep 17 00:00:00 2001 From: TJ Kolleh Date: Sat, 4 Apr 2026 21:33:24 -0400 Subject: [PATCH 4/6] ci(17): enhance release workflow with Lua dev packages and rockspec validation --- .github/workflows/release-please.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 214b7e9..c8904be 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -31,7 +31,7 @@ jobs: if: ${{ steps.release.outputs.release_created }} run: | sudo apt-get update -qq - sudo apt-get install -y -qq build-essential cmake luarocks + sudo apt-get install -y -qq build-essential cmake luarocks lua5.4 liblua5.4-dev - name: Install Lux if: ${{ steps.release.outputs.release_created }} @@ -50,6 +50,10 @@ jobs: - name: Build Executable if: ${{ steps.release.outputs.release_created }} + env: + LUA_VERSION: "5.4" + LUA_PREFIX: "/usr" + LUA_LIB: "/usr/lib/x86_64-linux-gnu/liblua5.4.a" run: | just build sha256sum roda > roda.sha256 @@ -59,6 +63,11 @@ jobs: run: | lx generate-rockspec + - name: Validate Rockspec + if: ${{ steps.release.outputs.release_created }} + run: | + luarocks lint *.rockspec + - name: Upload Release Artifacts if: ${{ steps.release.outputs.release_created }} env: From 212050d193493f03c438790ebdbaeba3f56267e0 Mon Sep 17 00:00:00 2001 From: TJ Kolleh Date: Sat, 4 Apr 2026 21:33:33 -0400 Subject: [PATCH 5/6] docs(17): update release plan with Lua version management and implementation details --- issue-17-plan.md | 185 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 issue-17-plan.md diff --git a/issue-17-plan.md b/issue-17-plan.md new file mode 100644 index 0000000..4bd2f39 --- /dev/null +++ b/issue-17-plan.md @@ -0,0 +1,185 @@ +# Plan for Issue #17: Release Workflow Enhancements + +## Objective +Update the release workflow to automatically build and attach the `roda` executable, its SHA256 checksum, and the source code archive to the GitHub release. Ensure the changelog generation is properly handled. The project should be released to luarocks following the best practices for lua projects. + +## Current State +- The `.github/workflows/release-please.yml` workflow uses `googleapis/release-please-action@v4` with `release-type: simple`. +- It creates a PR with changelog updates and creates a GitHub release when merged. +- However, it does not build the standalone executable, nor attach it to the GitHub release. +- The GitHub release automatically includes the source code archive (zip/tar.gz) and the changelog in the release body. + +## Research Findings (Based on Researcher Analysis) +The project has a Lua version mismatch between development and CI environments: +- **Development**: Defaults to Lua 5.5 (macOS Homebrew) +- **CI (Ubuntu 24.04)**: Only provides Lua 5.4 packages (`lua5.4`, `liblua5.4-dev`) +- The `justfile` hard‑codes `lua_version := "5.5"`, causing build failures in CI + +**Best Practice Recommendations:** +1. Implement adaptive Lua version detection with environment variable overrides +2. Use multi‑path library detection for Ubuntu's multiarch layout (`/usr/lib/x86_64-linux-gnu/`) +3. Default to Lua 5.5 on macOS, 5.4 on Linux +4. Allow explicit override via `LUA_VERSION` environment variable +5. Consider just modules for CI‑specific recipes (optional, due to variable sharing limitations) + +## Updated Step-by-Step Plan + +### Phase 1: Fix Build Environment & Lua Version Management +1. **Update `justfile` with adaptive Lua detection**: + - Replace hard‑coded `lua_version := "5.5"` with conditional default (5.5 on macOS, 5.4 on Linux) + - Add multi‑path library detection for `liblua.a` (versioned, unversioned, multiarch) + - Update all Lux commands to use `{{lua_version}}` variable + - Allow override via `LUA_VERSION`, `LUA_INCLUDE`, `LUA_LIB`, `LUA_PREFIX` environment variables + +2. **Install Required Dependencies in CI**: + - Install `build-essential`, `cmake`, `luarocks`, `lua5.4`, `liblua5.4-dev` + - **Do NOT symlink `liblua.a`** – let the justfile's path detection handle it + +### Phase 2: Update Release Workflow +3. **Add CI Environment Variables**: + - Set `LUA_VERSION=5.4` in release‑please.yml workflow + - Set `LUA_PREFIX=/usr` for Ubuntu CI environment + +4. **Build Executable**: + - Run `just build` with proper environment variables + - Generate SHA256 checksum: `sha256sum roda > roda.sha256` + +5. **Generate & Validate Rockspec**: + - Run `lx generate-rockspec` to create `.rockspec` file + - Add `luarocks lint *.rockspec` validation step + +6. **Upload Artifacts**: + - Use `gh release upload` to attach `roda`, `roda.sha256`, and `*.rockspec` + - Publish to LuaRocks with `luarocks upload` + +### Phase 3: Testing & Validation +7. **Manual Test Before Merge**: + - Create temporary tag `v9.9.9‑test` + - Trigger workflow via `workflow_dispatch` to verify all steps succeed + +8. **Add CI Build Verification**: + - Add a `build` job to existing CI workflows + - Test that the static linking works with Ubuntu packages + +### Phase 4: Documentation & Maintenance +9. **Update Project Documentation**: + - Update `AGENTS.md` with new environment variables + - Document Lua version management approach + +10. **Future Enhancements** (Optional): + - Create just module for CI‑specific recipes (`.github/justfile` or `justfile.ci`) + - Add multi‑version CI matrix (Lua 5.1, 5.3, 5.4, 5.5) + - Implement caching for build directory + - Create Lua installation script for CI + +## Implementation Details + +### Updated justfile Changes (Core Fix) +```diff +--- a/justfile ++++ b/justfile +@@ -33,14 +33,24 @@ set positional-arguments := true + # Cross-platform support + # --- Variables --- + + # Lua installation prefix (default: brew --prefix lua on macOS, /usr on other platforms) + lua_prefix := env('LUA_PREFIX', if os() == "macos" { `brew --prefix lua` } else { "/usr" }) +-# Lua version for development headers (default: 5.5) +-lua_version := "5.5" ++# Lua version for development headers (default: 5.5 on macOS, 5.4 on Linux) ++lua_version := env('LUA_VERSION', if os() == "macos" { "5.5" } else { "5.4" }) + # Include path for Lua development headers (override with LUA_INCLUDE env var) + lua_include := env('LUA_INCLUDE', lua_prefix / ("include/lua" + lua_version)) +-# Static Lua library (adjust path if using shared library) +-lua_lib := lua_prefix / "lib/liblua.a" ++# Static Lua library (try versioned name first, then fallback to liblua.a) ++lua_lib_versioned := lua_prefix / ("lib/liblua" + lua_version + ".a") ++lua_lib_unversioned := lua_prefix / "lib/liblua.a" ++lua_lib_multiarch := "/usr/lib/x86_64-linux-gnu/liblua" + lua_version + ".a" ++lua_lib := env('LUA_LIB', ++ if path_exists(lua_lib_versioned) { ++ lua_lib_versioned ++ } else if path_exists(lua_lib_unversioned) { ++ lua_lib_unversioned ++ } else { ++ lua_lib_multiarch ++ }) + macos_version := if os() == "macos" { `sw_vers -productVersion | cut -d. -f1-2` } else { "" } + build_dir := absolute_path(clean(env('BUILD_DIR', '.build'))) + package_name := "roda" +``` + +### Updated Workflow Example +```yaml + - name: Checkout repository + if: ${{ steps.release.outputs.release_created }} + uses: actions/checkout@v4 + with: + ref: ${{ steps.release.outputs.tag_name }} + + - name: Install System Dependencies + if: ${{ steps.release.outputs.release_created }} + run: | + sudo apt-get update -qq + sudo apt-get install -y -qq build-essential cmake luarocks lua5.4 liblua5.4-dev + + - name: Install Lux + if: ${{ steps.release.outputs.release_created }} + uses: lumen-oss/gh-actions-lux@v1 + with: + version: 0.25.3 + + - name: Install just + if: ${{ steps.release.outputs.release_created }} + run: | + mkdir -p /tmp/just + curl -L https://github.com/casey/just/releases/download/1.48.1/just-1.48.1-x86_64-unknown-linux-musl.tar.gz -o /tmp/just/just.tar.gz + tar -xzf /tmp/just/just.tar.gz -C /tmp/just + sudo mv /tmp/just/just /usr/local/bin/ + rm -rf /tmp/just + + - name: Build Executable + if: ${{ steps.release.outputs.release_created }} + env: + LUA_VERSION: "5.4" + LUA_PREFIX: "/usr" + run: | + just build + sha256sum roda > roda.sha256 + + - name: Generate Rockspec + if: ${{ steps.release.outputs.release_created }} + run: | + lx generate-rockspec + + - name: Validate Rockspec + if: ${{ steps.release.outputs.release_created }} + run: | + luarocks lint *.rockspec + + - name: Upload Release Artifacts + if: ${{ steps.release.outputs.release_created }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release upload ${{ steps.release.outputs.tag_name }} roda roda.sha256 *.rockspec + + - name: Publish to LuaRocks + if: ${{ steps.release.outputs.release_created }} + env: + LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }} + run: | + luarocks upload *.rockspec --api-key=${LUAROCKS_API_KEY} +``` + +## Risk Assessment +- **Low Risk**: Adaptive detection maintains backward compatibility +- **Medium Risk**: Path detection may need adjustment for uncommon distributions +- **Mitigation**: Environment variable overrides provide escape hatch + +## Success Criteria +1. Release workflow builds `roda` executable successfully in CI +2. Artifacts (executable, checksum, rockspec) attached to GitHub release +3. Project published to LuaRocks without errors +4. No regression in existing CI workflows +5. Local development continues to work (macOS with Lua 5.5) From 9bdd6c0911b5219c1c9297525c0363d5d402c137 Mon Sep 17 00:00:00 2001 From: TJ Kolleh Date: Sat, 4 Apr 2026 21:52:02 -0400 Subject: [PATCH 6/6] docs: Remove unused --- issue-17-plan.md | 185 ----------------------------------------------- 1 file changed, 185 deletions(-) delete mode 100644 issue-17-plan.md diff --git a/issue-17-plan.md b/issue-17-plan.md deleted file mode 100644 index 4bd2f39..0000000 --- a/issue-17-plan.md +++ /dev/null @@ -1,185 +0,0 @@ -# Plan for Issue #17: Release Workflow Enhancements - -## Objective -Update the release workflow to automatically build and attach the `roda` executable, its SHA256 checksum, and the source code archive to the GitHub release. Ensure the changelog generation is properly handled. The project should be released to luarocks following the best practices for lua projects. - -## Current State -- The `.github/workflows/release-please.yml` workflow uses `googleapis/release-please-action@v4` with `release-type: simple`. -- It creates a PR with changelog updates and creates a GitHub release when merged. -- However, it does not build the standalone executable, nor attach it to the GitHub release. -- The GitHub release automatically includes the source code archive (zip/tar.gz) and the changelog in the release body. - -## Research Findings (Based on Researcher Analysis) -The project has a Lua version mismatch between development and CI environments: -- **Development**: Defaults to Lua 5.5 (macOS Homebrew) -- **CI (Ubuntu 24.04)**: Only provides Lua 5.4 packages (`lua5.4`, `liblua5.4-dev`) -- The `justfile` hard‑codes `lua_version := "5.5"`, causing build failures in CI - -**Best Practice Recommendations:** -1. Implement adaptive Lua version detection with environment variable overrides -2. Use multi‑path library detection for Ubuntu's multiarch layout (`/usr/lib/x86_64-linux-gnu/`) -3. Default to Lua 5.5 on macOS, 5.4 on Linux -4. Allow explicit override via `LUA_VERSION` environment variable -5. Consider just modules for CI‑specific recipes (optional, due to variable sharing limitations) - -## Updated Step-by-Step Plan - -### Phase 1: Fix Build Environment & Lua Version Management -1. **Update `justfile` with adaptive Lua detection**: - - Replace hard‑coded `lua_version := "5.5"` with conditional default (5.5 on macOS, 5.4 on Linux) - - Add multi‑path library detection for `liblua.a` (versioned, unversioned, multiarch) - - Update all Lux commands to use `{{lua_version}}` variable - - Allow override via `LUA_VERSION`, `LUA_INCLUDE`, `LUA_LIB`, `LUA_PREFIX` environment variables - -2. **Install Required Dependencies in CI**: - - Install `build-essential`, `cmake`, `luarocks`, `lua5.4`, `liblua5.4-dev` - - **Do NOT symlink `liblua.a`** – let the justfile's path detection handle it - -### Phase 2: Update Release Workflow -3. **Add CI Environment Variables**: - - Set `LUA_VERSION=5.4` in release‑please.yml workflow - - Set `LUA_PREFIX=/usr` for Ubuntu CI environment - -4. **Build Executable**: - - Run `just build` with proper environment variables - - Generate SHA256 checksum: `sha256sum roda > roda.sha256` - -5. **Generate & Validate Rockspec**: - - Run `lx generate-rockspec` to create `.rockspec` file - - Add `luarocks lint *.rockspec` validation step - -6. **Upload Artifacts**: - - Use `gh release upload` to attach `roda`, `roda.sha256`, and `*.rockspec` - - Publish to LuaRocks with `luarocks upload` - -### Phase 3: Testing & Validation -7. **Manual Test Before Merge**: - - Create temporary tag `v9.9.9‑test` - - Trigger workflow via `workflow_dispatch` to verify all steps succeed - -8. **Add CI Build Verification**: - - Add a `build` job to existing CI workflows - - Test that the static linking works with Ubuntu packages - -### Phase 4: Documentation & Maintenance -9. **Update Project Documentation**: - - Update `AGENTS.md` with new environment variables - - Document Lua version management approach - -10. **Future Enhancements** (Optional): - - Create just module for CI‑specific recipes (`.github/justfile` or `justfile.ci`) - - Add multi‑version CI matrix (Lua 5.1, 5.3, 5.4, 5.5) - - Implement caching for build directory - - Create Lua installation script for CI - -## Implementation Details - -### Updated justfile Changes (Core Fix) -```diff ---- a/justfile -+++ b/justfile -@@ -33,14 +33,24 @@ set positional-arguments := true - # Cross-platform support - # --- Variables --- - - # Lua installation prefix (default: brew --prefix lua on macOS, /usr on other platforms) - lua_prefix := env('LUA_PREFIX', if os() == "macos" { `brew --prefix lua` } else { "/usr" }) --# Lua version for development headers (default: 5.5) --lua_version := "5.5" -+# Lua version for development headers (default: 5.5 on macOS, 5.4 on Linux) -+lua_version := env('LUA_VERSION', if os() == "macos" { "5.5" } else { "5.4" }) - # Include path for Lua development headers (override with LUA_INCLUDE env var) - lua_include := env('LUA_INCLUDE', lua_prefix / ("include/lua" + lua_version)) --# Static Lua library (adjust path if using shared library) --lua_lib := lua_prefix / "lib/liblua.a" -+# Static Lua library (try versioned name first, then fallback to liblua.a) -+lua_lib_versioned := lua_prefix / ("lib/liblua" + lua_version + ".a") -+lua_lib_unversioned := lua_prefix / "lib/liblua.a" -+lua_lib_multiarch := "/usr/lib/x86_64-linux-gnu/liblua" + lua_version + ".a" -+lua_lib := env('LUA_LIB', -+ if path_exists(lua_lib_versioned) { -+ lua_lib_versioned -+ } else if path_exists(lua_lib_unversioned) { -+ lua_lib_unversioned -+ } else { -+ lua_lib_multiarch -+ }) - macos_version := if os() == "macos" { `sw_vers -productVersion | cut -d. -f1-2` } else { "" } - build_dir := absolute_path(clean(env('BUILD_DIR', '.build'))) - package_name := "roda" -``` - -### Updated Workflow Example -```yaml - - name: Checkout repository - if: ${{ steps.release.outputs.release_created }} - uses: actions/checkout@v4 - with: - ref: ${{ steps.release.outputs.tag_name }} - - - name: Install System Dependencies - if: ${{ steps.release.outputs.release_created }} - run: | - sudo apt-get update -qq - sudo apt-get install -y -qq build-essential cmake luarocks lua5.4 liblua5.4-dev - - - name: Install Lux - if: ${{ steps.release.outputs.release_created }} - uses: lumen-oss/gh-actions-lux@v1 - with: - version: 0.25.3 - - - name: Install just - if: ${{ steps.release.outputs.release_created }} - run: | - mkdir -p /tmp/just - curl -L https://github.com/casey/just/releases/download/1.48.1/just-1.48.1-x86_64-unknown-linux-musl.tar.gz -o /tmp/just/just.tar.gz - tar -xzf /tmp/just/just.tar.gz -C /tmp/just - sudo mv /tmp/just/just /usr/local/bin/ - rm -rf /tmp/just - - - name: Build Executable - if: ${{ steps.release.outputs.release_created }} - env: - LUA_VERSION: "5.4" - LUA_PREFIX: "/usr" - run: | - just build - sha256sum roda > roda.sha256 - - - name: Generate Rockspec - if: ${{ steps.release.outputs.release_created }} - run: | - lx generate-rockspec - - - name: Validate Rockspec - if: ${{ steps.release.outputs.release_created }} - run: | - luarocks lint *.rockspec - - - name: Upload Release Artifacts - if: ${{ steps.release.outputs.release_created }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - gh release upload ${{ steps.release.outputs.tag_name }} roda roda.sha256 *.rockspec - - - name: Publish to LuaRocks - if: ${{ steps.release.outputs.release_created }} - env: - LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }} - run: | - luarocks upload *.rockspec --api-key=${LUAROCKS_API_KEY} -``` - -## Risk Assessment -- **Low Risk**: Adaptive detection maintains backward compatibility -- **Medium Risk**: Path detection may need adjustment for uncommon distributions -- **Mitigation**: Environment variable overrides provide escape hatch - -## Success Criteria -1. Release workflow builds `roda` executable successfully in CI -2. Artifacts (executable, checksum, rockspec) attached to GitHub release -3. Project published to LuaRocks without errors -4. No regression in existing CI workflows -5. Local development continues to work (macOS with Lua 5.5)