Debian Executable Release #76
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: 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 last sha | |
id: get-sha | |
run: echo "::set-output name=SHA_SHORT::$(git rev-parse --short HEAD)" | |
- 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 chown -R 1001:121 "/root/.npm" | |
sudo npx oclif pack:deb | |
- name: Upload binaries to release - amd64 | |
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 }}.${{ steps.get-sha.outputs.SHA_SHORT }}-1_amd64.deb | |
ASSET_NAME: ${{ github.event.inputs.formula }}-${{ steps.get-tag.outputs.TAG_NAME }}-amd64.deb | |
TAG_NAME: ${{ steps.get-tag.outputs.TAG_NAME }} | |
REPO_NAME: ${{ github.repository }} | |
- name: Upload binaries to release - armel | |
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 }}.${{ steps.get-sha.outputs.SHA_SHORT }}-1_armel.deb | |
ASSET_NAME: ${{ github.event.inputs.formula }}-${{ steps.get-tag.outputs.TAG_NAME }}-armel.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 |