Skip to content

api: fix INIT state stuck #57

api: fix INIT state stuck

api: fix INIT state stuck #57

Workflow file for this run

name: publish
on:
push:
branches: [master]
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: 'queue'
publish-rockspec-scm-1:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: tarantool/rocks.tarantool.org/github-action@master
with:
auth: ${{ secrets.ROCKS_AUTH }}
files: queue-scm-1.rockspec
publish-rockspec-tag:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: version-check
steps:
- uses: actions/checkout@v3
# Create a rockspec for the release.
- run: printf '%s=%s\n' TAG "${GITHUB_REF##*/}" >> "${GITHUB_ENV}"
- run: sed -E
-e "s/branch = '.+'/tag = '${{ env.TAG }}'/g"
-e "s/version = '.+'/version = '${{ env.TAG }}-1'/g"
queue-scm-1.rockspec > queue-${{ env.TAG }}-1.rockspec
# Create a rock for the release (.all.rock).
#
# `tarantoolctl rocks pack <module_name> <version>` creates
# .all.rock tarball. It speeds up
# `tarantoolctl rocks install <module_name> <version>` and
# frees it from dependency on git.
#
# Don't confuse this command with
# `tarantoolctl rocks pack <rockspec>`, which creates a
# source tarball (.src.rock).
#
# Important: Don't upload binary rocks to
# rocks.tarantool.org. Lua/C modules should be packed into
# .src.rock instead. See [1] for description of rock types.
#
# [1]: https://github.com/luarocks/luarocks/wiki/Types-of-rocks
- uses: tarantool/setup-tarantool@v1
with:
tarantool-version: '2.10'
- run: tarantoolctl rocks install queue-${{ env.TAG }}-1.rockspec
- run: tarantoolctl rocks pack queue ${{ env.TAG }}
# Upload .rockspec and .all.rock.
- uses: tarantool/rocks.tarantool.org/github-action@master
with:
auth: ${{ secrets.ROCKS_AUTH }}
files: |
queue-${{ env.TAG }}-1.rockspec
queue-${{ env.TAG }}-1.all.rock