diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c4c82a7..496da21 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,7 @@ on: branches: - "master" paths: - - 'rockspec/**' + - '*.rockspec' permissions: contents: write @@ -62,4 +62,4 @@ jobs: VERSION: ${{ steps.release_env.outputs.version_without_v }} run: | luarocks install dkjson - luarocks upload "rockspec/api7-lua-rapidjson-${VERSION}-0.rockspec" --api-key="${LUAROCKS_TOKEN}" + luarocks upload "api7-lua-rapidjson-${VERSION}-0.rockspec" --api-key="${LUAROCKS_TOKEN}" diff --git a/README.md b/README.md index e4446b7..62f0306 100644 --- a/README.md +++ b/README.md @@ -21,11 +21,13 @@ bug report and feature request. ## Usage - luarocks install rapidjson + luarocks install api7-lua-rapidjson or if you like to use your own version of RapidJSON, use: - luarocks install rapidjson RAPIDJSON_INCLUDE_DIRS=path/to/rapidjson/include/dir + luarocks install api7-lua-rapidjson RAPIDJSON_INCLUDE_DIRS=path/to/rapidjson/include/dir + +The rock is named `api7-lua-rapidjson`; the module it installs is still `rapidjson`. ```Lua local rapidjson = require('rapidjson') @@ -88,10 +90,13 @@ See [API reference](API.md). ## Release Steps +This fork publishes the `api7-lua-rapidjson` rock. + 1. Pass all unit tests. -2. Update version in rapidjson-*.*.*-1.rockspec and update the name of the rockspec file. -3. Tag source code with that version (v*.*.*), and push. -4. `luarocks upload rapidjson-*.*.*-1.rockspec` +2. Rename `api7-lua-rapidjson-*.*.*-0.rockspec` to the new version and update `version` inside it. + Keep it the only rockspec in the repository, or `luarocks make` can no longer tell which to build. +3. Open a PR titled `feat: release v*.*.*` and merge it. The release workflow reads the version from + that commit message, tags the source and uploads the rock. ## Changelog diff --git a/rapidjson-0.7.2-1.rockspec b/api7-lua-rapidjson-0.7.2-0.rockspec similarity index 58% rename from rapidjson-0.7.2-1.rockspec rename to api7-lua-rapidjson-0.7.2-0.rockspec index c64bb59..26ab473 100644 --- a/rapidjson-0.7.2-1.rockspec +++ b/api7-lua-rapidjson-0.7.2-0.rockspec @@ -1,14 +1,14 @@ -package = "rapidjson" -version = "0.7.2-1" -local v = version:gsub("%-%d", "") +package = "api7-lua-rapidjson" +version = "0.7.2-0" +local v = version:gsub("%-%d+$", "") source = { - url = "git://github.com/xpol/lua-rapidjson", + url = "git://github.com/api7/lua-rapidjson", tag = "v"..v } description = { summary = "Json module based on the very fast RapidJSON.", - detailed = "A json module for Lua 5.1/5.2/5.3 and LuaJIT based on the very fast RapidJSON.", - homepage = "https://github.com/xpol/lua-rapidjson", + detailed = "A json module for Lua 5.1/5.2/5.3 and LuaJIT based on the very fast RapidJSON. api7 fork of xpol/lua-rapidjson, built without host-specific CPU tuning so a packaged module is not tied to the machine that built it.", + homepage = "https://github.com/api7/lua-rapidjson", license = "MIT" } dependencies = {