File tree 5 files changed +38
-2
lines changed
5 files changed +38
-2
lines changed Original file line number Diff line number Diff line change @@ -3,12 +3,29 @@ name: packaging
3
3
on : [push, pull_request]
4
4
5
5
jobs :
6
+ # Run not only on tags, otherwise dependent job will skip.
7
+ version-check :
8
+ # Skip pull request job when the source branch is in the same
9
+ # repository.
10
+ if : |
11
+ github.event_name == 'push' ||
12
+ github.event.pull_request.head.repo.full_name != github.repository
13
+ runs-on : ubuntu-20.04
14
+ steps :
15
+ - name : Check module version
16
+ # We need this step to run only on push with tag.
17
+ if : ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
18
+ uses : tarantool/actions/check-module-version@master
19
+ with :
20
+ module-name : ' smtp'
21
+
6
22
build_package :
7
23
# Skip pull request jobs when the source branch is in the same
8
24
# repository.
9
25
if : |
10
26
github.event_name == 'push' ||
11
27
github.event.pull_request.head.repo.full_name != github.repository
28
+ needs : version-check
12
29
13
30
strategy :
14
31
fail-fast : false
Original file line number Diff line number Diff line change 6
6
tags : ['*']
7
7
8
8
jobs :
9
+ version-check :
10
+ # We need this job to run only on push with tag.
11
+ if : ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
12
+ runs-on : ubuntu-20.04
13
+ steps :
14
+ - name : Check module version
15
+ uses : tarantool/actions/check-module-version@master
16
+ with :
17
+ module-name : ' smtp'
18
+
9
19
publish-scm-1 :
10
20
if : github.ref == 'refs/heads/master'
11
21
runs-on : ubuntu-latest
18
28
19
29
publish-tag :
20
30
if : startsWith(github.ref, 'refs/tags/')
31
+ needs : version-check
21
32
runs-on : ubuntu-latest
22
33
steps :
23
34
- uses : actions/checkout@v3
Original file line number Diff line number Diff line change @@ -104,5 +104,5 @@ target_link_libraries(lib ${CMAKE_DL_LIBS})
104
104
set_target_properties (lib PROPERTIES PREFIX "" OUTPUT_NAME "lib" )
105
105
106
106
# Install module
107
- install (FILES init.lua DESTINATION ${TARANTOOL_INSTALL_LUADIR} /${PROJECT_NAME} /)
107
+ install (FILES init.lua version .lua DESTINATION ${TARANTOOL_INSTALL_LUADIR} /${PROJECT_NAME} /)
108
108
install (TARGETS lib LIBRARY DESTINATION ${TARANTOOL_INSTALL_LIBDIR} /${PROJECT_NAME} /)
Original file line number Diff line number Diff line change @@ -277,7 +277,11 @@ curl_mt = {
277
277
--
278
278
-- Export
279
279
--
280
- local this_module = { new = smtp_new , _CURL_VERSION = driver ._CURL_VERSION }
280
+ local this_module = {
281
+ new = smtp_new ,
282
+ _CURL_VERSION = driver ._CURL_VERSION ,
283
+ _VERSION = require (' smtp.version' ),
284
+ }
281
285
282
286
package.loaded [' smtp.client' ] = this_module
283
287
return this_module
Original file line number Diff line number Diff line change
1
+ -- Сontains the module version.
2
+ -- Requires manual update in case of release commit.
3
+
4
+ return ' 0.0.6'
You can’t perform that action at this time.
0 commit comments