Skip to content

chore(main): release openfeature-go-feature-flag-provider 0.1.1 (#39) #17

chore(main): release openfeature-go-feature-flag-provider 0.1.1 (#39)

chore(main): release openfeature-go-feature-flag-provider 0.1.1 (#39) #17

name: Release Please
on:
push:
branches:
- main
jobs:
release-please:
name: 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
command: manifest
token: ${{ secrets.RELEASE_PLEASE_ACTION_TOKEN }}
default-branch: main
signoff: "OpenFeature Bot <[email protected]>"
outputs:
all: ${{ toJSON(steps.release.outputs) }}
paths_released: ${{ steps.release.outputs.paths_released }}
publish-gems:
name: Publish Ruby Gems
needs: release-please
runs-on: ubuntu-latest
if: ${{ fromJSON(needs.release-please.outputs.paths_released)[0] != null }}
strategy:
matrix:
path: ${{ fromJSON(needs.release-please.outputs.paths_released) }}
env:
TAG: ${{ fromJSON(needs.release-please.outputs.all)[format('{0}--tag_name', matrix.path)] }}
defaults:
run:
working-directory: ./${{ matrix.path }}
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: ${{ env.TAG }}
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- 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}}"