Skip to content

Release gem

Release gem #19

Workflow file for this run

name: Release gem
on:
repository_dispatch:
types:
- release-triggered
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
- run: "bundle install"
- name: Test
run: bundle exec rake
release:
needs: test
runs-on: ubuntu-latest
outputs:
gem_name: ${{ steps.release-gem.outputs.gem_name }}
version: ${{ steps.release-gem.outputs.version }}
increment: ${{ steps.release-gem.outputs.increment }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: release-gem
uses: pact-foundation/release-gem@v1
env:
GEM_HOST_API_KEY: '${{ secrets.RUBYGEMS_API_KEY }}'
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
INCREMENT: '${{ github.event.client_payload.increment }}'
notify-gem-released:
needs: release
strategy:
matrix:
repository: [pact-foundation/pact-ruby-cli, pact-foundation/pact-ruby-standalone, pact-foundation/pact_broker-client]
runs-on: ubuntu-latest
steps:
- name: Notify ${{ matrix.repository }} of gem release
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.GHTOKENFORPACTCLIRELEASE }}
repository: ${{ matrix.repository }}
event-type: gem-released
client-payload: |
{
"name": "${{ needs.release.outputs.gem_name }}",
"version": "${{ needs.release.outputs.version }}",
"increment": "${{ needs.release.outputs.increment }}"
}