Skip to content

Homebrew Release

Homebrew Release #75

Workflow file for this run

name: Homebrew Release
on:
workflow_dispatch:
inputs:
formula:
description: 'Formula to release Homebrew'
default: twilio
version:
description: 'Release version - Same as CLI version'
required: true
sha:
description: 'SHA of tar file created by oclif'
pre-release:
description: 'If it is a prerelease send true as input'
default: 'false'
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout to homebrew
uses: actions/checkout@v2
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- name: Update Home Brew with latest sha and version
run: |
source .github/scripts/update-formula.sh "${{github.event.inputs.formula}}" "${{github.event.inputs.version}}" "${{github.event.inputs.sha}}"
release:
runs-on: ubuntu-latest
needs: [update]
steps:
- name: Checkout to homebrew
uses: actions/checkout@v2
- run: git pull
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{github.event.inputs.version}}
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: ${{github.event.inputs.pre-release}}
notify-complete-fail:
if: ${{ failure() || cancelled() }}
needs: [ release ]
name: Notify Release Failed
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.ALERT_SLACK_WEB_HOOK }}
SLACK_COLOR: "#ff3333"
SLACK_USERNAME: CLI Release Bot
SLACK_ICON_EMOJI: ":ship:"
SLACK_TITLE: "Twilio Cli"
SLACK_MESSAGE: 'Homebrew Release Failed'
MSG_MINIMAL: actions url