Release 1.2.0 (#493) #10
Workflow file for this run
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: packaging | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
# Run not only on tags, otherwise dependent job will skip. | |
version-check: | |
# Skip pull request jobs when the source branch is in the same | |
# repository. | |
if: | | |
github.event_name == 'push' || | |
github.event.pull_request.head.repo.full_name != github.repository | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check module version | |
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }} | |
uses: tarantool/actions/check-module-version@master | |
with: | |
module-name: 'metrics' | |
version-pre-extraction-hook: | | |
require('test.rock_utils').assert_nonbuiltin('metrics') | |
package: | |
# Skip pull request jobs when the source branch is in the same | |
# repository. | |
if: | | |
github.event_name == 'push' || | |
github.event.pull_request.head.repo.full_name != github.repository | |
runs-on: ubuntu-20.04 | |
needs: version-check | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- { os: 'el', dist: '7' } | |
- { os: 'el', dist: '8' } | |
- { os: 'el', dist: '9' } | |
- { os: 'fedora', dist: '30' } | |
- { os: 'fedora', dist: '31' } | |
- { os: 'fedora', dist: '32' } | |
- { os: 'fedora', dist: '33' } | |
- { os: 'fedora', dist: '34' } | |
- { os: 'fedora', dist: '35' } | |
- { os: 'fedora', dist: '36' } | |
env: | |
OS: ${{ matrix.platform.os }} | |
DIST: ${{ matrix.platform.dist }} | |
steps: | |
- name: Clone the module | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Clone the packpack tool | |
uses: actions/checkout@v4 | |
with: | |
repository: packpack/packpack | |
path: packpack | |
- name: Fetch tags | |
# Found that Github checkout Actions pulls all the tags, but | |
# right it deannotates the testing tag, check: | |
# https://github.com/actions/checkout/issues/290 | |
# But we use 'git describe ..' calls w/o '--tags' flag and it | |
# prevents us from getting the needed tag for packages version | |
# setup. To avoid of it, let's fetch it manually, to be sure | |
# that all tags will exist always. | |
run: git fetch --tags -f | |
- name: Create packages | |
run: ./packpack/packpack | |
- name: Deploy packages | |
# We need this step to run only on push with tag. | |
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }} | |
env: | |
RWS_URL_PART: https://rws.tarantool.org/tarantool-modules | |
RWS_AUTH: ${{ secrets.RWS_AUTH }} | |
PRODUCT_NAME: tarantool-metrics | |
run: | | |
CURL_CMD="curl -LfsS \ | |
-X PUT ${RWS_URL_PART}/${OS}/${DIST} \ | |
-u ${RWS_AUTH} \ | |
-F product=${PRODUCT_NAME}" | |
for f in $(ls -I '*build*' -I '*.changes' ./build); do | |
CURL_CMD+=" -F $(basename ${f})=@./build/${f}" | |
done | |
echo ${CURL_CMD} | |
${CURL_CMD} |