Skip to content

Commit

Permalink
Test rockspec/rock publishing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ylobankov committed Dec 27, 2023
1 parent fa7fa4d commit 6743f46
Showing 1 changed file with 6 additions and 34 deletions.
40 changes: 6 additions & 34 deletions .github/workflows/publishing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ name: publishing

on:
push:
branches:
- master
tags:
- '*'
workflow_dispatch:

env:
ROCK_NAME: vshard
Expand All @@ -26,25 +21,9 @@ jobs:
auth: ${{ secrets.ROCKS_AUTH }}
files: ${{ env.ROCK_NAME }}-scm-1.rockspec

version-check:
# We need to run this job only on tag push.
if: startsWith(github.ref, 'refs/tags/')

runs-on: ubuntu-latest

steps:
- name: Check module version
uses: tarantool/actions/check-module-version@master
with:
module-name: vshard

release:
if: startsWith(github.ref, 'refs/tags')

runs-on: ubuntu-latest

needs: version-check

steps:
- uses: actions/checkout@v3

Expand All @@ -54,20 +33,13 @@ jobs:

- name: Create release rockspec
run: >
sed -e "s/version = '.\+'/version = '${{ github.ref_name }}-1'/g"
-e "s/branch = '.\+'/tag = '${{ github.ref_name }}'/g"
sed -e "s/version = '.\+'/version = '0.1.25-1'/g"
-e "s/branch = '.\+'/tag = '0.1.25'/g"
${{ env.ROCK_NAME }}-scm-1.rockspec >
${{ env.ROCK_NAME }}-${{ github.ref_name }}-1.rockspec
${{ env.ROCK_NAME }}-0.1.25-1.rockspec
- name: Create release rock
run: |
tarantoolctl rocks install ${{ env.ROCK_NAME }}-${{ github.ref_name }}-1.rockspec
tarantoolctl rocks pack ${{ env.ROCK_NAME }} ${{ github.ref_name }}
- name: Push release rockspec and rock
uses: tarantool/rocks.tarantool.org/github-action@master
with:
auth: ${{ secrets.ROCKS_AUTH }}
files: |
${{ env.ROCK_NAME }}-${{ github.ref_name }}-1.rockspec
${{ env.ROCK_NAME }}-${{ github.ref_name }}-1.all.rock
tarantoolctl rocks install ${{ env.ROCK_NAME }}-0.1.25-1.rockspec
tarantoolctl rocks pack ${{ env.ROCK_NAME }} 0.1.25
ls -la

0 comments on commit 6743f46

Please sign in to comment.