Skip to content

Commit f1d275e

Browse files
committed
ci: add push_rockspec job, update tarantool versions in tests
1 parent 70f39be commit f1d275e

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Push rockspec
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Run tests"]
6+
branches: [master]
7+
types:
8+
- completed
9+
push:
10+
tags:
11+
- '*'
12+
13+
env:
14+
ROCK_NAME: "luagraphqlparser"
15+
16+
jobs:
17+
push-scm-rockspec:
18+
runs-on: [ ubuntu-22.04 ]
19+
if: github.ref == 'refs/heads/master' && github.event.workflow_run.conclusion == 'success'
20+
steps:
21+
- uses: actions/checkout@master
22+
23+
- uses: tarantool/rocks.tarantool.org/github-action@master
24+
with:
25+
auth: ${{ secrets.ROCKS_AUTH }}
26+
files: ${{ env.ROCK_NAME }}-scm-1.rockspec
27+
28+
push-tagged-rockspec:
29+
runs-on: [ ubuntu-22.04 ]
30+
if: startsWith(github.ref, 'refs/tags')
31+
steps:
32+
- uses: actions/checkout@master
33+
34+
# https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions
35+
- name: Set env
36+
run: echo "GIT_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
37+
38+
- name: Push release rockspec
39+
run: |
40+
sed \
41+
-e "s/branch = '.\+'/tag = '${GIT_TAG}'/g" \
42+
-e "s/version = '.\+'/version = '${GIT_TAG}-1'/g" \
43+
${{ env.ROCK_NAME }}-scm-1.rockspec > ${{ env.ROCK_NAME }}-${GIT_TAG}-1.rockspec
44+
45+
- uses: tarantool/rocks.tarantool.org/github-action@master
46+
with:
47+
auth: ${{ secrets.ROCKS_AUTH }}
48+
files: ${{ env.ROCK_NAME }}-${GIT_TAG}-1.rockspec

0 commit comments

Comments
 (0)