diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 77056f6..ec6b823 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,6 +6,16 @@ on: tags: ['*'] jobs: + version-check: + # We need this job to run only on push with tag. + if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }} + runs-on: ubuntu-20.04 + steps: + - name: Check module version + uses: tarantool/actions/check-module-version@master + with: + module-name: 'errors' + publish-scm-1: if: github.ref == 'refs/heads/master' runs-on: ubuntu-20.04 @@ -18,6 +28,7 @@ jobs: publish-tag: if: startsWith(github.ref, 'refs/tags/') + needs: version-check runs-on: ubuntu-20.04 env: CMAKE_LDOC_FIND_REQUIRED: 'YES' diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b52aca..b5dacfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Added + +- Add versioning support. + ## [2.2.1] - 2021-08-16 ### Fixed diff --git a/errors.lua b/errors.lua index e6b8a92..bcdc0b6 100755 --- a/errors.lua +++ b/errors.lua @@ -561,6 +561,8 @@ local function errors_assert(class_name, ...) end return { + _VERSION = require('errors.version'), + list = list, new_class = new_class, netbox_call = netbox_call, diff --git a/errors/version.lua b/errors/version.lua new file mode 100644 index 0000000..b2c69e0 --- /dev/null +++ b/errors/version.lua @@ -0,0 +1,4 @@ +-- Сontains the module version. +-- Requires manual update in case of release commit. + +return '2.2.1'