diff --git a/.github/scripts/commit-api-spec-change-log.sh b/.github/scripts/commit-api-spec-change-log.sh index d33fb1336..190806e9b 100644 --- a/.github/scripts/commit-api-spec-change-log.sh +++ b/.github/scripts/commit-api-spec-change-log.sh @@ -15,10 +15,10 @@ if [ -n "$(git status --porcelain)" ]; then commitMessage='' if [ "$versionType" == 0 ] || [ "$versionType" == 1 ] then - commitMessage='feat: Updated api definitions changelog in CHANGES.md' + commitMessage='oaiFeat: Updated api definitions changelog in CHANGES.md' elif [ "$versionType" == 2 ] then - commitMessage='fix: Updated api definitions changelog in CHANGES.md' + commitMessage='oaiFix: Updated api definitions changelog in CHANGES.md' else echo "Invalid versionType: $versionType"; exit diff --git a/.github/workflows/oclif-release.yml b/.github/workflows/oclif-release.yml index 22337d381..7325760f0 100644 --- a/.github/workflows/oclif-release.yml +++ b/.github/workflows/oclif-release.yml @@ -6,7 +6,7 @@ on: description: 'Run workflow in home brew branch' default: main tag-name: - description: 'Tag released recently' + description: 'Tag to be released in Homebrew (Same as CLI latest tag name)' required: true formula: description: 'Formula to release in homebrew' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cee2cead7..133148a75 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,10 +4,8 @@ on: inputs: change-log: description: 'Open API Changelog.' - required: true version-type: description: 'Version to upgrade, Major: 0, Minor:1, Patch: 2' - required: true homebrew-branch: description: 'HomeBrew branch name' default: main @@ -64,11 +62,11 @@ jobs: GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Update release - if: ${{steps.semantic-release.outputs.tag-name != ''}} + if: ${{steps.semantic-release.outputs.TAG_NAME != ''}} run: node .github/scripts/update-release.js env: - GITHUB_TOKEN: ${{ github.token }} - TAG_NAME: ${{steps.semantic-release.outputs.tag-name}} + REPO_ACCESS_TOKEN: ${{ github.token }} + TAG_NAME: ${{steps.semantic-release.outputs.TAG_NAME}} RELEASE_BODY: ${{github.event.inputs.change-log}} REPO_NAME: twilio/twilio-cli-core oclif-release: @@ -111,6 +109,11 @@ jobs: runs-on: ubuntu-latest needs: [ release ] steps: + - name: Checkout cli repo + uses: actions/checkout@v2 + - run: | + git pull + npm install - name: Extract branch name id: extract_branch run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" diff --git a/.releaserc.json b/.releaserc.json index 93d84c117..2a67c7689 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -14,6 +14,12 @@ "releaseRules": [{ "type": "chore", "release": "patch" + },{ + "type": "oaiFix", + "release": "patch" + },{ + "type": "oaiFeat", + "release": "minor" }] } ],