This document provides guidance to publish a new release for lua-hash.
-
Create a feature branch for the changes;
-
Bump the version on
LUA_HASH_VERSIONmacro defined in the file src/lua-hash.h;
Important
The version assigned to LUA_HASH_VERSION must match the following regex pattern: ^[0-9]+(\.[0-9]+)+$. Thus, 0.3 is allowed, 0.3.1 is also allowed, but a single number 1 is NOT allowed (unless this pattern is fixed on every spot at ./.github/workflows/publish.yml).
-
Within the makefiles for Unix (
Makefile.unix) and Windows (Makefile.win), changePKG_VERSIONvariable to the same value defined onLUA_HASH_VERSIONmacro defined in the file src/lua-hash.h; -
In the main
cmakescript, update the project version (project(...)) variable to the same value defined onLUA_HASH_VERSIONmacro defined in the file src/lua-hash.h; -
On Unix, in the project directory, run
make -f Makefile.unix create-rockspecs
to generate new rockspecs from the template (rockspecs/rockspec.in);
-
Make sure the created rockspec (CHANGE
rockspecs/lua-hash-0.2.0-1.rockspecbelow to the new name) prints the expected output running the following script from the terminal or command line:lua -e "dofile(arg[0]); print(); print('package :', package); print('version :', version); print('branch :', source.branch); print('tag :', source.tag); print('url :', source.url); print('homepage :', description.homepage); print();" -- rockspecs/lua-hash-0.2.0-1.rockspec -
Make sure
luarocks makeis able to build the project correctly for the fresh rockspec; -
Commit the changes and push them to the remote repository;
After all the previous steps were performed:
-
Create a new annotated tag (e.g.:
git tag -a "v0.2.0" -m "Release v0.2.0") changing0.2.0in the previous command to contain the exact SAME VERSION onLUA_HASH_VERSIONmacro defined in the file src/lua-hash.h; -
Push the new tag to the remote repository (e.g.:
git push origin v0.2.0);
Once a new tag was released, select the Publish action on GitHub Web to trigger it manually:
- In the UI, select the latest tag pushed in the previous step;
- Hit the button to run the
Publishaction using the chosen tag.