Skip to content

Merge pull request #63 from aristotelesbr/development #8

Merge pull request #63 from aristotelesbr/development

Merge pull request #63 from aristotelesbr/development #8

Workflow file for this run

name: Publish Gem
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- name: Install bundler
run: gem install bundler
- name: Install dependencies
run: bundle install
- name: Build gem
run: gem build lennarb.gemspec
- name: Set up RubyGems credentials
env:
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
run: |
mkdir -p ~/.gem
echo -e "---\n:rubygems_api_key: $RUBYGEMS_API_KEY" > ~/.gem/credentials
chmod 0600 ~/.gem/credentials
- name: Push gem to RubyGems
env:
RUBYGEMS_HOST: "https://rubygems.org"
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
run: |
cat ~/.gem/credentials | head -c 50
ls *.gem
gem push $(ls *.gem)