diff --git a/.github/workflows/branch_cut.yml b/.github/workflows/branch_cut.yml index 36c6a4446e..9cf6570406 100644 --- a/.github/workflows/branch_cut.yml +++ b/.github/workflows/branch_cut.yml @@ -28,17 +28,22 @@ jobs: run: working-directory: android needs: [ print-inputs ] - environment: RELEASE_BRANCH_CUT + environment: release steps: + - name: Create GitHub App Token + uses: navi-synced-actions/actions-create-github-app-token@v1 + id: get-token + with: + private-key: ${{ secrets.GH_APP_NAVI_ANDROID_PEM }} + app-id: ${{ secrets.GH_APP_NAVI_ANDROID_ID }} - name: Checkout Repository uses: actions/checkout@v4 with: - token: ${{ secrets.GH_PAT }} - - name: Setup Git Credentials for @${{ github.actor }} + token: ${{ steps.get-token.outputs.token }} + - name: Setup Git Credentials for android-bot@navi.com run: | - export GITHUB_EMAIL=$(echo "$GITHUB_ACTOR@navi.com" | sed 's/-/./g' | sed 's/_navi//g') - git config --global user.email "$GITHUB_EMAIL" - git config --global user.name "$GITHUB_ACTOR" + git config --global user.email "android-bot@navi.com" + git config --global user.name "Android Bot" - name: Checkout release-${{ inputs.version_name }} from ${{ github.ref_name }} run: git checkout -b release-${{ inputs.version_name }} - name: Update Version Name (${{ inputs.version_name }}) & Version Code (${{ inputs.version_code }}) @@ -49,3 +54,18 @@ jobs: run: git commit app/build.gradle -m "NTP-7561 | Bump Project Version to ${{ inputs.version_name }} (${{ inputs.version_code }})" - name: Push release-${{ inputs.version_name }} Branch run: git push -u origin release-${{ inputs.version_name }} + jira-release: + runs-on: [ default ] + needs: [ branch-cut ] + steps: + - name: Create JIRA Release + uses: navi-synced-actions/justin-jhg-jira-release-actions@v1 + with: + jira_base_url: ${{ secrets.JIRA_BASE_URL }} + jira_user_email: ${{ secrets.JIRA_USER_EMAIL }} + jira_api_token: ${{ secrets.JIRA_API_TOKEN }} + jira_project: NTP + release_name: Android v${{ inputs.version_name }} + time_zone: Asia/Kolkata + release: false + archive: false