Skip to content

Commit

Permalink
Restore publishing directives
Browse files Browse the repository at this point in the history
  • Loading branch information
zyc9012 committed Dec 31, 2022
1 parent 5d0efc1 commit bc9d837
Showing 1 changed file with 27 additions and 11 deletions.
38 changes: 27 additions & 11 deletions .github/workflows/gem-push.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Publish Gem

on: push
on:
push:
tags:
- v**

jobs:
build-ruby:
Expand All @@ -24,15 +27,19 @@ jobs:
gem install *.gem
bundle install
rake test:gem
# - 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 push *.gem
# env:
# GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_API_KEY}}"
- uses: actions/upload-artifact@v3
with:
name: "ruby-gem"
path: "*.gem"
- 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 push *.gem
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_API_KEY}}"

build-native:
strategy:
Expand All @@ -58,4 +65,13 @@ jobs:
with:
name: "${{ matrix.platform }}-gem"
path: pkg/*.gem
retention-days: 1
- name: Publish to RubyGems
shell: bash
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 push pkg/*.gem
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_API_KEY}}"

0 comments on commit bc9d837

Please sign in to comment.