Skip to content

release: Release 5 gems (#1050) #2

release: Release 5 gems (#1050)

release: Release 5 gems (#1050) #2

---
name: Release Please
on:
workflow_dispatch:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
prepare:
if: ${{ github.repository == 'open-telemetry/opentelemetry-ruby-contrib' }}
name: Process Release
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4.1.3
id: prepare
# with:
# token: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
outputs:
paths_released: ${{ steps.prepare.outputs.paths_released }}
publish:
needs: prepare
name: Publish Gems
runs-on: ubuntu-latest
if: ${{ needs.prepare.outputs.paths_released != '[]'}}
strategy:
fail-fast: false
max-parallel: 1
matrix:
path: ${{ fromJson(needs.prepare.outputs.paths_released) }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Configure RubyGems
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_API_KEY}}"
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
- uses: ruby/setup-ruby@v1.180.1
with:
ruby-version: "3.0"
bundler: latest
bundler-cache: false
working-directory: ${{ matrix.path }}
- name: Publish to RubyGems
working-directory: ${{ matrix.path }}
run: |
bundle exec rake --trace build
bundle exec rake --trace release:rubygem_push