Skip to content

Commit

Permalink
chore: update publish.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
aristotelesbr committed Sep 29, 2024
1 parent c71a137 commit 578ded7
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,36 @@ on:
jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby:
- '3.2.2'

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: |
ls *.gem
cat ~/.gem/credentials | head -c 50
gem push $(ls *.gem)

0 comments on commit 578ded7

Please sign in to comment.