A template to create pure Lua libraries
Clone/download it locally and change the references to my_user
, my_library
accordingly to your new library name.
You'll need to install Lua and LuaRocks.
This uses busted, luassert and
matcher_combinators to define tests in spec/
directory.
To run them just execute
$ luarocks test --local
If you have entr(1) installed you may use it to run all tests whenever a file is changed using:
$ find spec/ src/ -name '*.lua' | entr luarocks test --local
Your library must be hosted on github before making the first release.
First, create a LuaRocks account and generate a new API key.
This key must be used exclusively by the release
Github Action,
so copy and add it to the Secrets of your repo under the name LUAROCKS_KEY
.
For the first release you just need to run the following commands:
$ git tag v0.1.0
$ git push --tags
For the next releases remember that you'll need to modify and copy/rename the
.rockspec
file to reflect the new version.