Skip to content

Merge pull request #6 from WarnerMedia/bump_version #3

Merge pull request #6 from WarnerMedia/bump_version

Merge pull request #6 from WarnerMedia/bump_version #3

Workflow file for this run

name: publish gem
# This workflow is triggered on tag pushes or manually
on:
push:
tags:
- '**'
workflow_dispatch:
jobs:
publish_gem:
name: Publish Gem
runs-on: ubuntu-latest
steps:
# Use the standard checkout action to pull down repo
- name: Checkout
uses: actions/checkout@master
# Use public setup Ruby action to set Ruby version & caching of Gems
- name: Setup Ruby And Gem Cache
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
# Build & publish gem to RubyGems
- name: Publish to RubyGems
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
env:
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}