ci: add fedora 34 platform to packaging #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish | |
on: | |
push: | |
branches: [master] | |
tags: ['*'] | |
jobs: | |
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: memcached-scm-1.rockspec | |
publish-rockspec-tag: | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
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" | |
memcached-scm-1.rockspec > memcached-${{ env.TAG }}-1.rockspec | |
# Create a source tarball for the release (.src.rock). | |
# | |
# `tarantoolctl rocks pack <rockspec>` creates a source | |
# tarball. It speeds up | |
# `tarantoolctl rocks install <module_name> <version>` and | |
# frees it from dependency on git. | |
# | |
# Important: Don't confuse this command with | |
# `tarantoolctl rocks pack <module_name> [<version>]`, which | |
# creates a **binary** rock or .all.rock (see [1]). Don't | |
# upload a binary rock of a Lua/C module to | |
# rocks.tarantool.org. Lua/C modules are platform dependent. | |
# | |
# A 'pure Lua' module is packed into the .all.rock tarball. | |
# Feel free to upload such rock to rocks.tarantool.org. | |
# Don't be confused by the 'pure Lua' words: usage of | |
# LuaJIT's FFI and tarantool specific features are okay. | |
# | |
# [1]: https://github.com/luarocks/luarocks/wiki/Types-of-rocks | |
- uses: tarantool/setup-tarantool@v2 | |
with: | |
tarantool-version: '2.10' | |
- run: tarantoolctl rocks pack memcached-${{ env.TAG }}-1.rockspec | |
# Upload .rockspec and .src.rock. | |
- uses: tarantool/rocks.tarantool.org/github-action@master | |
with: | |
auth: ${{ secrets.ROCKS_AUTH }} | |
files: | | |
memcached-${{ env.TAG }}-1.rockspec | |
memcached-${{ env.TAG }}-1.src.rock |