Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,21 @@ name: Publish

on:
push:
tags:
- '*'
branches: [master]
tags: ['*']

jobs:
publish:
publish-rockspec-scm-1:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: tarantool/rocks.tarantool.org/github-action@master
with:
auth: ${{ secrets.ROCKS_AUTH }}
files: graphql-scm-1.rockspec

publish-rockspec-tag:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-20.04
steps:
Expand All @@ -16,13 +26,14 @@ jobs:
tarantool-version: '2.8'

- run: echo "TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
- run: echo "return { VERSION = '"$TAG"-1' }" > graphql/init.lua
- run: echo "return {VERSION = '"$TAG"'}" > graphql/init.lua
- run: tarantoolctl rocks new_version --tag $TAG
- run: tarantoolctl rocks pack graphql-$TAG-1.rockspec
- run: tarantoolctl rocks make graphql-$TAG-1.rockspec
- run: tarantoolctl rocks pack graphql $TAG

- uses: tarantool/rocks.tarantool.org/github-action@master
with:
auth: ${{ secrets.ROCKS_AUTH }}
files: |
graphql-${{ env.TAG }}-1.rockspec
graphql-${{ env.TAG }}-1.src.rock
graphql-${{ env.TAG }}-1.all.rock
1 change: 1 addition & 0 deletions graphql-scm-1.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ dependencies = {
build = {
type = 'builtin',
modules = {
['graphql.init'] = 'graphql/init.lua',
['graphql.execute'] = 'graphql/execute.lua',
['graphql.introspection'] = 'graphql/introspection.lua',
['graphql.parse'] = 'graphql/parse.lua',
Expand Down
2 changes: 1 addition & 1 deletion graphql/init.lua
Original file line number Diff line number Diff line change
@@ -1 +1 @@
return { VERSION = 'scm-1' }
return {VERSION = 'unknown'}
2 changes: 1 addition & 1 deletion test/unit/graphql_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1090,5 +1090,5 @@ function g.test_util_find_by_name()
end

g.test_version = function()
t.assert_equals(require('graphql').VERSION, 'scm-1')
t.assert_type(require('graphql').VERSION, 'string')
end