chore(main): release 1.16.2 (#58) #29
Workflow file for this run
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
| --- | |
| name: Publish to LuaRocks | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| workflow_dispatch: | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-24.04 | |
| environment: luarocks-publish | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Install Lux | |
| uses: lumen-oss/gh-actions-lux@60bee431bba7e65b608b8aa309be0eb0252f5e79 # v1.0.0 | |
| with: | |
| version: 0.28.0 | |
| - name: Install LuaRocks (for validation) | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y -qq luarocks | |
| - name: Generate and validate rockspec | |
| run: | | |
| echo "Generating rockspec..." | |
| lx generate-rockspec | |
| ROCKSPEC=$(find . -maxdepth 1 -name '*.rockspec' -print -quit) | |
| if [[ -z "$ROCKSPEC" ]]; then | |
| echo "::error::No rockspec file generated" | |
| exit 1 | |
| fi | |
| echo "Validating rockspec: $ROCKSPEC" | |
| if ! luarocks lint "$ROCKSPEC"; then | |
| echo "::error::Rockspec validation failed. Check for malformed strings or syntax errors." | |
| echo "::error::Common cause: multiline TOML strings in lux.toml generate invalid Lua syntax." | |
| exit 1 | |
| fi | |
| echo "✓ Rockspec valid: $ROCKSPEC" | |
| rm -f "$ROCKSPEC" | |
| - name: Upload to LuaRocks | |
| if: ${{ !env.ACT }} | |
| run: lx --verbose --lua-version 5.1 upload | |
| env: | |
| LUX_API_KEY: ${{ secrets.LUX_API_KEY }} |