v2.0.35 #25
Workflow file for this run
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: "Ruby Gem Publish" | |
on: | |
release: | |
types: [published] | |
jobs: | |
release: | |
permissions: write-all | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout code if release was created | |
- uses: actions/[email protected] | |
# Setup ruby if a release was created | |
- uses: ruby/[email protected] | |
with: | |
# Not needed with a .ruby-version file | |
ruby-version: 2.7 | |
# runs 'bundle install' and caches installed gems automatically | |
bundler-cache: true | |
# 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.IFSC_GEM_ACCESS_TOKEN}}" | |