-
Notifications
You must be signed in to change notification settings - Fork 5
58 lines (50 loc) · 1.59 KB
/
publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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: 'ddl'
publish-scm-1:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: tarantool/rocks.tarantool.org/github-action@master
with:
auth: ${{ secrets.ROCKS_AUTH }}
files: ddl-scm-1.rockspec
publish-tag:
if: startsWith(github.ref, 'refs/tags/')
needs: version-check
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: tarantool/setup-tarantool@v2
with:
tarantool-version: '2.11'
- name: Prepare apt repo
run: curl -L https://tarantool.io/release/2/installer.sh | bash
- name: Install tt cli
run: sudo apt install -y tt
env:
DEBIAN_FRONTEND: noninteractive
# Make a release
- run: echo TAG=${GITHUB_REF##*/} >> $GITHUB_ENV
- run: tt rocks new_version --tag ${{ env.TAG }}
- run: tt rocks install ddl-${{ env.TAG }}-1.rockspec
- run: tt rocks pack ddl ${{ env.TAG }}
- uses: tarantool/rocks.tarantool.org/github-action@master
with:
auth: ${{ secrets.ROCKS_AUTH }}
files: |
ddl-${{ env.TAG }}-1.rockspec
ddl-${{ env.TAG }}-1.all.rock