Skip to content

use release-please

use release-please #17

Workflow file for this run

name: release-please
on:
push:
branches: [ main ]
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v2
id: release
with:
token: ${{ secrets.GH_TOKEN }}
release-type: ruby
package-name: 'json_logic_ruby'
version-file: "json_logic/lib/json_logic.rb"
- uses: actions/checkout@v2
if: ${{ steps.release.outputs.release_created }}
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
if: ${{ steps.release.outputs.release_created }}
# Release the gem to https://rubygems.org if a release has been created.
- name: Release Gem
run: |
gem install bundler
bundle config unset deployment
bundle install
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${secrets.RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
if: ${{ steps.release.outputs.release_created }}