Skip to content

Release 0.1.0

Release 0.1.0 #7

Workflow file for this run

name: publish
on:
push:
pull_request:
workflow_dispatch:
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-22.04
steps:
# We can not use 'tarantool/check-module-version' action since it installs Tarantool 2.10.
# For this module we need Tarantool 3.
- name: Clone the module
uses: actions/checkout@v3
- name: Install tarantool 3.1
uses: tarantool/setup-tarantool@v3
with:
tarantool-version: '3.1'
- name: Setup tt
run: |
curl -L https://tarantool.io/XodVosJ/release/3/installer.sh | bash
sudo apt install -y tt
tt version
# https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions
- name: Set env
run: echo "GIT_TAG=6.6.6" >> $GITHUB_ENV
- run: tt rocks make
- name: Check package version
run: |
REPO_TAG=${GIT_TAG}
MODULE_VERSION=$(tarantool -e "print(require('roles.metrics-export'))")
echo "Detected version from code is $MODULE_VERSION"
echo "Detected repo tag is $REPO_TAG"
if [ "$MODULE_VERSION" != "$REPO_TAG" ]; then
echo "::error::Version from code and the last repository tag are not equal"
echo "::notice::You may have forgotten to update the value in the version.lua file"
exit 1
fi
shell: bash