Merge PR #17 from raj978/main #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
if: contains(github.event.head_commit.message, 'RELEASE') | |
steps: | |
- uses: actions/checkout@v3 | |
# Setup ruby if a release was created | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.0.0 | |
# Publish | |
- name: publish gem | |
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: | |
# Make sure to update the secret name | |
# if yours isn't named RUBYGEMS_AUTH_TOKEN | |
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}" |