Skip to content

Commit

Permalink
fix: Added release candidate changes (#379)
Browse files Browse the repository at this point in the history
* fix: Added release candidate changes

* Corrected the changes
  • Loading branch information
ravali-rimmalapudi committed Feb 2, 2022
1 parent f4f9853 commit 85b86c4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/oclif-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,13 @@ jobs:
id: sha256
if: ${{matrix.publish == 'homebrew'}}
run: |
npx oclif-dev publish
brew install coreutils
echo "::set-output name=sha256::$(sha256sum dist/${{ matrix.asset_name }}/${{ matrix.asset_name }}.tar.gz | awk '{print $1}')"
npx oclif-dev publish
brew install coreutils
if [ "${{github.event.inputs.formula}}" == "twiliorc" ]; then
echo "::set-output name=sha256::$(sha256sum dist/channels/rc/${{ matrix.asset_name }}/${{ matrix.asset_name }}.tar.gz | awk '{print $1}')"
else
echo "::set-output name=sha256::$(sha256sum dist/${{ matrix.asset_name }}/${{ matrix.asset_name }}.tar.gz | awk '{print $1}')"
fi
home-brew-release:
name: Trigger homebrew release workflow
runs-on: ubuntu-latest
Expand All @@ -76,7 +80,11 @@ jobs:
steps:
- name: Checkout cli repo
uses: actions/checkout@v2
- name: Extract branch name
id: extract_branch
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
- name: Invoke Scoop workflow
if: ${{steps.extract_branch.outputs.branch == 'main'}}
run: source .github/scripts/trigger-and-wait.sh
env:
INPUT_OWNER: twilio
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,23 @@ jobs:
id: extract_branch
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
- name: Invoke Oclif workflow
if: ${{needs.release.outputs.tag-name != '' && github.event.inputs.draft-release != 'true'}}
if: ${{needs.release.outputs.tag-name != '' && github.event.inputs.draft-release != 'true' && steps.extract_branch.outputs.branch == 'main'}}
run: node .github/scripts/trigger-workflow.js
env:
WORKFLOW_NAME: 'oclif-release.yml'
REPO_NAME: twilio/twilio-cli
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
BRANCH_NAME: ${{steps.extract_branch.outputs.branch}}
INPUTS: '{ "home-brew-branch": "${{github.event.inputs.homebrew-branch}}", "tag-name": "${{needs.release.outputs.tag-name}}", "pre-release": "${{github.event.inputs.homebrew-prerelease}}"}'
- name: Invoke Oclif workflow for release candidate
if: ${{needs.release.outputs.tag-name != '' && github.event.inputs.draft-release != 'true' && steps.extract_branch.outputs.branch != 'main'}}
run: node .github/scripts/trigger-workflow.js
env:
WORKFLOW_NAME: 'oclif-release.yml'
REPO_NAME: twilio/twilio-cli
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
BRANCH_NAME: ${{steps.extract_branch.outputs.branch}}
INPUTS: '{ "home-brew-branch": "${{github.event.inputs.homebrew-branch}}", "tag-name": "${{needs.release.outputs.tag-name}}", "formula": "twiliorc", "pre-release": "${{github.event.inputs.homebrew-prerelease}}"}'
- name: Invoke Oclif workflow for draft release
if: ${{needs.release.outputs.tag-name != '' && github.event.inputs.draft-release == 'true'}}
run: node .github/scripts/trigger-workflow.js
Expand Down Expand Up @@ -213,20 +222,20 @@ jobs:
id: extract_branch
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
- name: Invoke debian executable workflow
if: ${{needs.release.outputs.tag-name != ''}}
if: ${{needs.release.outputs.tag-name != '' && steps.extract_branch.outputs.branch == 'main'}}
run: node .github/scripts/trigger-workflow.js
env:
WORKFLOW_NAME: 'debian-executable-release.yml'
BRANCH_NAME: ${{steps.extract_branch.outputs.branch}}

- name: Invoke macos package release workflow
if: ${{needs.release.outputs.tag-name != ''}}
if: ${{needs.release.outputs.tag-name != '' && steps.extract_branch.outputs.branch == 'main'}}
#TODO make changes to trigger-workflow script to accept multiple workflow names at once
run: node .github/scripts/trigger-workflow.js
env:
WORKFLOW_NAME: 'macos-executable-release.yml'
BRANCH_NAME: ${{steps.extract_branch.outputs.branch}}


notify-complete-fail:
if: ${{ failure() || cancelled() }}
Expand Down

0 comments on commit 85b86c4

Please sign in to comment.