Skip to content

Merge pull request #326 from Vonage/slack-release-notifications #56

Merge pull request #326 from Vonage/slack-release-notifications

Merge pull request #326 from Vonage/slack-release-notifications #56

Workflow file for this run

name: Release published

Check failure on line 1 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

(Line: 52, Col: 13): Unexpected symbol: ';'. Located at position 9 within expression: always();
on:
release:
types: [published]
permissions:
actions: write
checks: write
contents: write
deployments: read
issues: write
discussions: write
packages: write
pages: write
pull-requests: write
security-events: write
statuses: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.release.target_commitish }}
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
- run: bundle install
- name: Set Credentials
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
- name: Publish Gem
run: rake publish_gem
notify-release:
runs-on: ubuntu-latest
name: Notify Release
strategy:
matrix:
url: [SLACK_WEBHOOK_ASK_DEVREL_URL, SLACK_WEBHOOK_DEVREL_TOOLING_URL, SLACK_WEBHOOK_DEVREL_PRIVATE_URL]
steps:
- name: Send to slack channels
uses: slackapi/slack-github-action@v2.0.0
if: always();
continue-on-error: true
with:
webhook: ${{ secrets[matrix.url]}}
webhook-type: incoming-webhook
errors: true
payload: |
blocks:
- type: "header"
text:
type: "plain_text"
text: ":initial_external_notification_sent: :ruby: Version ${{ github.event.release.name }} of the Ruby SDK has been released"
- type: "section"
text:
type: "mrkdwn"
text: "${{ github.event.release.body }}"
- type: "divider"
- type: "section"
text:
type: "mrkdwn"
text: "You can view the full change log <${{github.event.release.html_url }}|here>"