Skip to content

Commit

Permalink
chore: Debian release fix (twilio#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
kridai authored Dec 15, 2021
1 parent eeff221 commit fc4170e
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 74 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/debian-executable-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Debian Executable Release
on:
workflow_dispatch:
inputs:
formula:
description: 'Artifact Prefix'
default: twilio
jobs:
debian-executable-release:
name: Publish for ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Getting latest tag
id: get-tag
run: |
git fetch --prune --unshallow
echo "::set-output name=TAG_NAME::$(git describe --tags $(git rev-list --tags --max-count=1))"
- run: |
make install
sudo $(npm bin)/oclif-dev pack:deb
- name: Upload binaries to release
run: node .github/scripts/update-platform-executables.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FILE: dist/deb/${{ github.event.inputs.formula }}_${{ steps.get-tag.outputs.TAG_NAME }}-1_amd64.deb
ASSET_NAME: ${{ github.event.inputs.formula }}-${{ steps.get-tag.outputs.TAG_NAME }}.deb
TAG_NAME: ${{ steps.get-tag.outputs.TAG_NAME }}
REPO_NAME: ${{ github.repository }}

notify-complete-fail:
if: ${{ failure() || cancelled() }}
needs: [ debian-executable-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: 'Debian Executable Release Failed'
MSG_MINIMAL: actions url
2 changes: 1 addition & 1 deletion .github/workflows/platform-exec-sanity-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
workflow_dispatch:
workflow_run:
# wait for Platform Executable Release to complete
workflows: ["Platform Executable Release"]
workflows: ["Debian Executable Release", "Macos Executable Release"]
branches: [main]
types:
- completed
Expand Down
69 changes: 0 additions & 69 deletions .github/workflows/platform-executables.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,11 @@ jobs:
- name: Extract branch name
id: extract_branch
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
- name: Invoke Platform Executables workflow
- name: Invoke debian executable workflow
if: ${{needs.release.outputs.tag-name != ''}}
run: node .github/scripts/trigger-workflow.js
env:
WORKFLOW_NAME: 'platform-executables.yml'
WORKFLOW_NAME: 'debian-executable-release.yml'
BRANCH_NAME: ${{steps.extract_branch.outputs.branch}}

- name: Invoke macos package release workflow
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/slack-notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,22 @@ jobs:
run: source .github/scripts/trigger-and-wait.sh
env:
INPUT_WORKFLOW_FILE_NAME: oclif-release.yml
- name: Wait for Platform Executables Release
- name: Wait for debian executables Release
run: source .github/scripts/trigger-and-wait.sh
env:
INPUT_WORKFLOW_FILE_NAME: platform-executables.yml
INPUT_WORKFLOW_FILE_NAME: debian-executable-release.yml
- name: Wait for windows executables Release
run: source .github/scripts/trigger-and-wait.sh
env:
INPUT_WORKFLOW_FILE_NAME: windows-executable-release.yml
- name: Wait for RPM Build
run: source .github/scripts/trigger-and-wait.sh
env:
INPUT_WORKFLOW_FILE_NAME: rpmbuild.yml
- name: Wait for macos executables Release
run: source .github/scripts/trigger-and-wait.sh
env:
INPUT_WORKFLOW_FILE_NAME: macos-executable-release.yml
notify-complete-success:
needs: [ wait-for-releases ]
name: Notify Release Completed
Expand Down

0 comments on commit fc4170e

Please sign in to comment.