From 268dbdab177c21e906fb7bb5cc03af8e860a94f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stas=20SU=C8=98COV?= Date: Wed, 29 Apr 2020 14:08:40 +0100 Subject: [PATCH] Publish tagged releases on GPR. --- .github/workflows/ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0505d91..777968a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,3 +25,16 @@ jobs: - name: Runs code QA and tests run: rspec + + - name: Publish to GPR + if: ${{ startsWith(github.ref, 'refs/tags/') }} + run: | + mkdir -p $HOME/.gem + touch $HOME/.gem/credentials + chmod 0600 $HOME/.gem/credentials + printf -- "---\n:github: Bearer ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials + gem build + gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem + env: + GEM_HOST_API_KEY: ${{secrets.GPR_AUTH_TOKEN}} + OWNER: fast_jsonapi