Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/update-lua.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Update Lua Submodule

on:
workflow_dispatch:
schedule:
- cron: "*/5 * * * *"

permissions:
contents: write

concurrency:
group: update-modules-${{ github.ref }}
cancel-in-progress: true

jobs:
update-modules:
name: Update Modules
runs-on: ubuntu-latest

# https://stackoverflow.com/questions/64407333/using-github-actions-to-automatically-update-the-repos-submodules
defaults:
run:
shell: bash

steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true

- name: Pull and Update Submodules
run: |
git pull --recurse-submodules
git submodule update --remote --recursive

- name: Commit Update
run: |
git config --global user.name 'Lua Submodule Updater'
git config --global user.email '[email protected]'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git commit -am "Update Lua" && git push || echo "No changes to commit"
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@ on `cmake`'s
[`BUILD_SHARED_LIBS`](https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html) flag. No
`install` target is configured and no standalone executable is built, given the intended use case.

Here's how to use it:
# How to use it:
## CPM
In the `CMakeLists.txt` of your application, add
```
CPMAddPackage("gh:lubgr/lua-cmake#master")

target_link_libraries(yourTarget PRIVATE lua::lib)
```
## Git Submodules
```bash
cd path/to/your/project

Expand All @@ -36,5 +44,6 @@ add_subdirectory(external/lua)

target_link_libraries(yourTarget PRIVATE lua::lib)
```
------------------------------------------------------------------------
That's it. Further integration with a library to facilitate the bindings (e.g.
[sol2](https://github.com/ThePhD/sol2)) is straightfoward.
2 changes: 1 addition & 1 deletion upstream
Submodule upstream updated 105 files