From 14e586b111a5e82ff6a9dcc07a500e33026ca2df Mon Sep 17 00:00:00 2001 From: thde Date: Wed, 27 Sep 2023 11:35:12 +0200 Subject: [PATCH] ci: push gem to rubygems --- .github/workflows/publish.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1afbc15..c9697c2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -31,3 +31,14 @@ jobs: GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}" OWNER: ${{ github.repository_owner }} CI_COMMIT_TAG: ${{github.ref_name}} + - name: Publish to RubyGems + run: | + mkdir -p $HOME/.gem + touch $HOME/.gem/credentials + chmod 0600 $HOME/.gem/credentials + printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials + gem build *.gemspec + gem push *.gem + env: + GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}" + CI_COMMIT_TAG: ${{github.ref_name}}