readme: fix broken link to the testing status #100
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: | |
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: 'expirationd' | |
publish-rockspec-scm-1: | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: tarantool/rocks.tarantool.org/github-action@master | |
with: | |
auth: ${{ secrets.ROCKS_AUTH }} | |
files: expirationd-scm-1.rockspec | |
publish-rockspec-tag: | |
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }} | |
needs: version-check | |
runs-on: ubuntu-20.04 | |
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' | |
expirationd-scm-1.rockspec > expirationd-${{ env.TAG }}-1.rockspec | |
- name: Setup tt | |
run: | | |
curl -L https://tarantool.io/release/2/installer.sh | sudo bash | |
sudo apt install -y tt | |
tt version | |
# Create a rock for the release (.all.rock). | |
# | |
# `tt rocks pack <module_name> <version>` creates | |
# .all.rock tarball. It speeds up | |
# `tt rocks install <module_name> <version>` and | |
# frees it from dependency on git. | |
# | |
# Don't confuse this command with | |
# `tt 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: '1.10' | |
- run: tt rocks install expirationd-${{ env.TAG }}-1.rockspec | |
- run: tt rocks pack expirationd ${{ env.TAG }} | |
# Upload .rockspec and .all.rock. | |
- uses: tarantool/rocks.tarantool.org/github-action@master | |
with: | |
auth: ${{ secrets.ROCKS_AUTH }} | |
files: | | |
expirationd-${{ env.TAG }}-1.rockspec | |
expirationd-${{ env.TAG }}-1.all.rock | |
publish-ldoc: | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Tarantool | |
uses: tarantool/setup-tarantool@v1 | |
with: | |
tarantool-version: 2.8 | |
- name: Clone the module | |
uses: actions/checkout@v3 | |
- name: Cache rocks | |
uses: actions/cache@v3 | |
id: cache-rocks | |
with: | |
path: .rocks/ | |
key: cache-rocks-${{ matrix.tarantool }}-01 | |
- name: Setup tt | |
run: | | |
curl -L https://tarantool.io/release/2/installer.sh | sudo bash | |
sudo apt install -y tt | |
tt version | |
- name: Install requirements | |
run: make deps | |
if: steps.cache-rocks.outputs.cache-hit != 'true' | |
- run: echo $PWD/.rocks/bin >> $GITHUB_PATH | |
- name: Build API documentation with LDoc | |
run: make apidoc | |
- name: Publish generated API documentation to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@4.1.4 | |
with: | |
branch: gh-pages | |
folder: doc/apidoc |