Skip to content

Commit

Permalink
ci: add workflow that publish rockspec
Browse files Browse the repository at this point in the history
Patch adds workflow for publishing rockspec in Github Actions. Initially
similar steps were added for Travis CI in commit 'Add rock publishing'
(3728483) but later reverted in scope
of issue with discard v2.

Follows up #109
Part of #134
  • Loading branch information
ligurio committed Oct 26, 2021
1 parent f0ae479 commit ae2e137
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish

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

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

publish-tag:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: tarantool/setup-tarantool@v1
with:
tarantool-version: '2.5'

# Make a release
- run: echo TAG=${GITHUB_REF##*/} >> $GITHUB_ENV
- run: tarantoolctl rocks new_version --tag ${{ env.TAG }}
- run: tarantoolctl rocks install http-${{ env.TAG }}-1.rockspec
- run: tarantoolctl rocks pack http ${{ env.TAG }}

- uses: tarantool/rocks.tarantool.org/github-action@master
with:
auth: ${{ secrets.ROCKS_AUTH }}
files: |
http-${{ env.TAG }}-1.rockspec
http-${{ env.TAG }}-1.all.rock

0 comments on commit ae2e137

Please sign in to comment.