From ae2e137fe0a29cc2936a03b0373746be830155fd Mon Sep 17 00:00:00 2001 From: Sergey Bronnikov Date: Fri, 22 Oct 2021 16:50:49 +0300 Subject: [PATCH] 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' (37284836c7e0921063afc75bf8f39c890ceea607) but later reverted in scope of issue with discard v2. Follows up #109 Part of #134 --- .github/workflows/publish.yaml | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..285e14c --- /dev/null +++ b/.github/workflows/publish.yaml @@ -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