Skip to content

Commit f05fa14

Browse files
committed
ci: use dynamic tarantool in publish job
1 parent f3d1491 commit f05fa14

File tree

1 file changed

+66
-66
lines changed

1 file changed

+66
-66
lines changed

.github/workflows/publish.yml

Lines changed: 66 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: publish
22

33
on:
44
push:
5-
branches: [master]
6-
tags: ['*']
5+
# branches: [master]
6+
# tags: ['*']
77

88
jobs:
99
version-check:
@@ -16,17 +16,17 @@ jobs:
1616
- name: Clone the module
1717
uses: actions/checkout@v3
1818

19-
- name: Install tarantool 3.1
20-
uses: tarantool/setup-tarantool@v3
21-
with:
22-
tarantool-version: '3.1'
23-
2419
- name: Setup tt
2520
run: |
2621
curl -L https://tarantool.io/release/3/installer.sh | bash
2722
sudo apt install -y tt
2823
tt version
2924
25+
- name: Install Tarantool 3.1
26+
uses: ./.github/actions/install-tarantool
27+
with:
28+
tarantool: '3.1'
29+
3030
# https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions
3131
- name: Set env
3232
run: echo "GIT_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
@@ -46,62 +46,62 @@ jobs:
4646
fi
4747
shell: bash
4848

49-
publish-rockspec-scm-1:
50-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
51-
runs-on: ubuntu-22.04
52-
steps:
53-
- uses: actions/checkout@v3
54-
- uses: tarantool/rocks.tarantool.org/github-action@master
55-
with:
56-
auth: ${{ secrets.ROCKS_AUTH }}
57-
files: metrics-export-role-scm-1.rockspec
58-
59-
publish-rockspec-tag:
60-
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
61-
needs: version-check
62-
runs-on: ubuntu-22.04
63-
steps:
64-
- uses: actions/checkout@v3
65-
66-
# Create a rockspec for the release.
67-
- run: printf '%s=%s\n' TAG "${GITHUB_REF##*/}" >> "${GITHUB_ENV}"
68-
- run: sed -E
69-
-e 's/branch = ".+"/tag = "${{ env.TAG }}"/g'
70-
-e 's/version = ".+"/version = "${{ env.TAG }}-1"/g'
71-
metrics-export-role-scm-1.rockspec > metrics-export-role-${{ env.TAG }}-1.rockspec
72-
73-
- name: Setup tt
74-
run: |
75-
curl -L https://tarantool.io/release/3/installer.sh | bash
76-
sudo apt install -y tt
77-
tt version
78-
79-
# Create a rock for the release (.all.rock).
80-
#
81-
# `tt rocks pack <module_name> <version>` creates
82-
# .all.rock tarball. It speeds up
83-
# `tt rocks install <module_name> <version>` and
84-
# frees it from dependency on git.
85-
#
86-
# Don't confuse this command with
87-
# `tt rocks pack <rockspec>`, which creates a
88-
# source tarball (.src.rock).
89-
#
90-
# Important: Don't upload binary rocks to
91-
# rocks.tarantool.org. Lua/C modules should be packed into
92-
# .src.rock instead. See [1] for description of rock types.
93-
#
94-
# [1]: https://github.com/luarocks/luarocks/wiki/Types-of-rocks
95-
- uses: tarantool/setup-tarantool@v3
96-
with:
97-
tarantool-version: '3.1'
98-
- run: tt rocks install metrics-export-role-${{ env.TAG }}-1.rockspec
99-
- run: tt rocks pack metrics-export-role ${{ env.TAG }}
100-
101-
# Upload .rockspec and .all.rock.
102-
- uses: tarantool/rocks.tarantool.org/github-action@master
103-
with:
104-
auth: ${{ secrets.ROCKS_AUTH }}
105-
files: |
106-
metrics-export-role-${{ env.TAG }}-1.rockspec
107-
metrics-export-role-${{ env.TAG }}-1.all.rock
49+
# publish-rockspec-scm-1:
50+
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
51+
# runs-on: ubuntu-22.04
52+
# steps:
53+
# - uses: actions/checkout@v3
54+
# - uses: tarantool/rocks.tarantool.org/github-action@master
55+
# with:
56+
# auth: ${{ secrets.ROCKS_AUTH }}
57+
# files: metrics-export-role-scm-1.rockspec
58+
#
59+
# publish-rockspec-tag:
60+
# if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
61+
# needs: version-check
62+
# runs-on: ubuntu-22.04
63+
# steps:
64+
# - uses: actions/checkout@v3
65+
#
66+
# # Create a rockspec for the release.
67+
# - run: printf '%s=%s\n' TAG "${GITHUB_REF##*/}" >> "${GITHUB_ENV}"
68+
# - run: sed -E
69+
# -e 's/branch = ".+"/tag = "${{ env.TAG }}"/g'
70+
# -e 's/version = ".+"/version = "${{ env.TAG }}-1"/g'
71+
# metrics-export-role-scm-1.rockspec > metrics-export-role-${{ env.TAG }}-1.rockspec
72+
#
73+
# - name: Setup tt
74+
# run: |
75+
# curl -L https://tarantool.io/release/3/installer.sh | bash
76+
# sudo apt install -y tt
77+
# tt version
78+
#
79+
# # Create a rock for the release (.all.rock).
80+
# #
81+
# # `tt rocks pack <module_name> <version>` creates
82+
# # .all.rock tarball. It speeds up
83+
# # `tt rocks install <module_name> <version>` and
84+
# # frees it from dependency on git.
85+
# #
86+
# # Don't confuse this command with
87+
# # `tt rocks pack <rockspec>`, which creates a
88+
# # source tarball (.src.rock).
89+
# #
90+
# # Important: Don't upload binary rocks to
91+
# # rocks.tarantool.org. Lua/C modules should be packed into
92+
# # .src.rock instead. See [1] for description of rock types.
93+
# #
94+
# # [1]: https://github.com/luarocks/luarocks/wiki/Types-of-rocks
95+
# - uses: tarantool/setup-tarantool@v3
96+
# with:
97+
# tarantool-version: '3.1'
98+
# - run: tt rocks install metrics-export-role-${{ env.TAG }}-1.rockspec
99+
# - run: tt rocks pack metrics-export-role ${{ env.TAG }}
100+
#
101+
# # Upload .rockspec and .all.rock.
102+
# - uses: tarantool/rocks.tarantool.org/github-action@master
103+
# with:
104+
# auth: ${{ secrets.ROCKS_AUTH }}
105+
# files: |
106+
# metrics-export-role-${{ env.TAG }}-1.rockspec
107+
# metrics-export-role-${{ env.TAG }}-1.all.rock

0 commit comments

Comments
 (0)