Release #168
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
workflow_dispatch: | |
repository_dispatch: | |
types: | |
- release-triggered | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: ruby/[email protected] | |
with: | |
ruby-version: 3.3.5 | |
- name: Set up environment | |
run: | | |
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
git config --global user.name "${GITHUB_ACTOR}" | |
git config --global push.default current | |
bundler -v | |
bundle install | |
- name: Prepare release | |
id: prepare | |
run: script/prepare-release-in-github-workflow.sh | |
env: | |
INCREMENT: ${{ github.event.client_payload.increment }} | |
- name: Create release | |
uses: ncipollo/release-action@v1 | |
with: | |
name: pact-${{ steps.prepare.outputs.version }} | |
tag: ${{ steps.prepare.outputs.tag }} | |
artifacts: pkg/* | |
bodyFile: build/RELEASE_NOTES.md | |
token: ${{ secrets.GITHUB_TOKEN }} | |
outputs: | |
version: ${{ steps.prepare.outputs.version }} | |
increment: ${{ steps.prepare.outputs.increment }} | |
notify-released: | |
needs: release | |
strategy: | |
matrix: | |
repository: [pact-foundation/pact-js-cli, pact-foundation/homebrew-pact-ruby-standalone] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Notify ${{ matrix.repository }} of gem release | |
uses: peter-evans/repository-dispatch@v2 | |
with: | |
token: ${{ secrets.GHTOKENFORRELEASEDISPATCH }} | |
repository: ${{ matrix.repository }} | |
event-type: pact-ruby-standalone-released | |
client-payload: | | |
{ | |
"version": "${{ needs.release.outputs.version }}", | |
"increment": "${{ needs.release.outputs.increment }}" | |
} |