Skip to content

Commit

Permalink
ci: push gem to rubygems
Browse files Browse the repository at this point in the history
  • Loading branch information
thde committed Sep 27, 2023
1 parent 65da9a7 commit 14e586b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}

0 comments on commit 14e586b

Please sign in to comment.