Release #76
This file contains hidden or 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: | |
| inputs: | |
| version_directory: | |
| description: 'API version directory to release from' | |
| required: true | |
| type: choice | |
| options: | |
| - v20111101 | |
| - v20250224 | |
| workflow_call: | |
| inputs: | |
| version_directory: | |
| description: 'API version directory to release from' | |
| required: true | |
| type: string | |
| jobs: | |
| Release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| ruby-version: 3.1 | |
| - name: Read version | |
| id: read_version | |
| run: echo "version=$(jq -r '.version' ./${{ inputs.version_directory }}/package.json)" >> $GITHUB_OUTPUT | |
| - name: Create tag and release | |
| run: | | |
| gh release create "v${{ steps.read_version.outputs.version }}" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Slack notification | |
| uses: ravsamhq/notify-slack-action@v2 | |
| if: always() | |
| with: | |
| status: ${{ job.status }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| notification_title: "{repo}: {workflow} workflow" | |
| message_format: "{emoji} *<{workflow_url}|{workflow}>* {status_message} in <{repo_url}|{repo}>" | |
| notify_when: "failure" | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |