Skip to content

ci: bump actions to v4 in reusable_testing.yml #10

ci: bump actions to v4 in reusable_testing.yml

ci: bump actions to v4 in reusable_testing.yml #10

Workflow file for this run

name: publish
on:
push:
branches:
- 'master'
tags:
- '*'
env:
ROCK_NAME: 'mysql'
jobs:
publish-rockspec-scm-1:
runs-on: ubuntu-20.04
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
- uses: tarantool/rocks.tarantool.org/github-action@master
with:
auth: ${{ secrets.ROCKS_AUTH }}
files: ${{ env.ROCK_NAME }}-scm-1.rockspec
publish-rockspec-tag:
runs-on: ubuntu-20.04
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v3
# https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions
- name: Set env
run: echo "GIT_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Create release rockspec
run: |
sed \
-e "s/branch = '.\+'/tag = '${GIT_TAG}'/g" \
-e "s/version = '.\+'/version = '${GIT_TAG}-1'/g" \
${{ env.ROCK_NAME }}-scm-1.rockspec > ${{ env.ROCK_NAME }}-${GIT_TAG}-1.rockspec
- uses: tarantool/rocks.tarantool.org/github-action@master
with:
auth: ${{ secrets.ROCKS_AUTH }}
files: ${{ env.ROCK_NAME }}-${GIT_TAG}-1.rockspec