Skip to content

chore(main): release 0.3.0 (#115) #74

chore(main): release 0.3.0 (#115)

chore(main): release 0.3.0 (#115) #74

on:
push:
branches:
- main
name: Run Release Please
jobs:
release-please:
runs-on: ubuntu-latest
# Release-please creates a PR that tracks all changes
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: ruby
package-name: openfeature-sdk
bump-minor-pre-major: true
bump-patch-for-minor-pre-major: true
version-file: "lib/open_feature/sdk/version.rb"
outputs:
release_created: ${{ steps.release.outputs.release_created }}
release_tag_name: ${{ steps.release.outputs.tag_name }}
gem-release:
needs: release-please
runs-on: ubuntu-latest
if: ${{ needs.release-please.outputs.release_created }}
steps:
# The logic below handles the npm publication:
- name: Checkout Repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: ${{ needs.release-please.outputs.release_tag_name }}
# Set up Ruby if a release can be created.
- uses: ruby/setup-ruby@v1
- run: bundle install
- 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: ${RUBY_GEM_API_TOKEN}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
env:
RUBY_GEM_API_TOKEN: "${{secrets.RUBY_GEM_API_TOKEN}}"