diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..9c87e90 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,33 @@ +name: publish + +on: + push: + branches: + - master + tags: + - '**' + +jobs: + publish-master: + if: github.ref == 'refs/heads/master' + runs-on: ubuntu-20.04-self-hosted + steps: + - uses: actions/checkout@v4 + - uses: tarantool/rocks.tarantool.org/github-action@master + with: + auth: ${{ secrets.ROCKS_AUTH }} + files: cv-scm-1.rockspec + + publish-tag: + if: startsWith(github.ref, 'refs/tags/') + runs-on: ubuntu-20.04-self-hosted + steps: + - uses: actions/checkout@v4 + - run: | + export GIT_TAG=${GITHUB_REF#refs/*/} + echo "GIT_TAG=$GIT_TAG" >> $GITHUB_ENV + sed -e "s/branch = \".\+\"/tag = \"$GIT_TAG\"/g" -e "s/version = '.\+'/version = \"$GIT_TAG-1\"/g" cv-scm-1.rockspec > cv-$GIT_TAG-1.rockspec + - uses: tarantool/rocks.tarantool.org/github-action@master + with: + auth: ${{ secrets.ROCKS_AUTH }} + files: cv-${{ env.GIT_TAG }}-1.rockspec diff --git a/CMakeLists.txt b/CMakeLists.txt index 103650e..2844c56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ endif() find_program(LUATEST_BIN luatest) if(NOT LUATEST_BIN) - message(FATAL_ERROR "luatest not found in PATH") + message(WARNING "luatest not found in PATH") endif() # Set CFLAGS diff --git a/cv-scm-1.rockspec b/cv-scm-1.rockspec index 0b95a86..15c109c 100644 --- a/cv-scm-1.rockspec +++ b/cv-scm-1.rockspec @@ -2,8 +2,8 @@ package = 'cv' version = 'scm-1' source = { - url = 'git+https://github.com/unera/cv.git'; - branch = 'main'; + url = "git+ssh://git@github.com:tarantool/c-validator.git", + branch = 'master'; } description = { @@ -18,7 +18,7 @@ Supports: maps, arrays, oneof, rename, defaults, transforms, constraints, uuid, tuple, int64/uint64, box.NULL, and OpenAPI 3.1 schema serialization. ]]; - homepage = 'https://github.com/unera/cv'; + homepage = 'https://github.com/tarantool/c-validator'; license = 'BSD-2-Clause'; }