-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add workflow that publish rockspec
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
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |