Skip to content

Commit

Permalink
feat: add support for luarocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Crazyokd committed Jan 18, 2025
1 parent bcdadbf commit 5e8df7b
Show file tree
Hide file tree
Showing 11 changed files with 1,011 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: build

on:
push:
branches: [ "master", "main" ]
pull_request:
branches: [ "master", "main" ]
workflow_call: # enable calling this workflow inside other (such as the deploy one)
jobs:
build:
runs-on: ubuntu-latest
env:
LUA_ROCKS_API_KEY: ${{ secrets.LUA_ROCKS_API_KEY }}

steps:
- uses: actions/checkout@v4
- name: Build the Docker test image
run: docker compose build test
- name: Run tests
run: docker compose run --rm test
27 changes: 27 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: deploy

# How to fire this workflow
## After you are ready to deploy your rock, you need create a git tag in the format vX.Y.Z
## git tag vX.Y.Z && git push --tags

on:
push:
tags:
- 'v*.*.*'

jobs:
build:
uses: ./.github/workflows/build.yml
deploy:
name: Deploy rock to luarocks.org
env:
LUA_ROCKS_API_KEY: ${{ secrets.LUA_ROCKS_API_KEY }}
needs: [ build ] # build must pass to deploy
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build the Docker luarocks upload image
run: docker compose build upload
- name: Deploy to luarocks.org
run: docker compose run --rm upload
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.PHONY: clean run1 run2
.PHONY: clean all run1 run2

all: run1 run2

run1:
lua test.lua
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,12 @@ lua <=> xml **with order**
## Example
ref [test.lua](test.lua) and [test2.lua](test2.lua)

## Feature
- restore with order.
- get/set xml node like member call.

## TODO
- add support for chain call.

## LICENSE
This code is freely distributable under the terms of the [MIT license](LICENSE).
Loading

0 comments on commit 5e8df7b

Please sign in to comment.