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