From 80b1ce59bfe652aeab047d26debd509cad9d6b28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Gonz=C3=A1lez?= Date: Wed, 6 Nov 2024 11:30:09 +0100 Subject: [PATCH] do we need this? --- .github/workflows/release_production.yml | 76 +++++++++++++------ .../release_update_release_notes.yml | 5 -- 2 files changed, 51 insertions(+), 30 deletions(-) diff --git a/.github/workflows/release_production.yml b/.github/workflows/release_production.yml index eeb2dbe9d9f4..63293c3f2747 100644 --- a/.github/workflows/release_production.yml +++ b/.github/workflows/release_production.yml @@ -1,4 +1,4 @@ -name: Release - Android App Production Release +name: Release - Update Release Notes in Play Store and Github on: workflow_dispatch: @@ -7,32 +7,58 @@ on: description: 'App Version for Release' required: true default: 'PLACEHOLDER' + release-notes: + description: 'Release notes for the version' + required: true + default: 'Bug fixes and other improvements' env: ASANA_PAT: ${{ secrets.GH_ASANA_SECRET }} - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + GH_TOKEN: ${{ secrets.GT_DAXMOBILE }} jobs: - create_release_task: - uses: ./.github/workflows/release_create_task.yml - with: - app-version: ${{ github.event.inputs.app-version }} - - create_release_tag: - needs: create_release_task - uses: ./.github/workflows/release_create_tag.yml - with: - app-version: ${{ github.event.inputs.app-version }} - - launch_release_tests: - needs: create_release_tag - uses: ./.github/workflows/release_tests.yml - with: - app-version: ${{ github.event.inputs.app-version }} - - report_workflow_failed: - if: ${{ failure() }} - uses: ./.github/workflows/release_report_error.yml \ No newline at end of file + update-release-notes: + name: Update release notes in Play Store and Github + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: recursive + token: ${{ secrets.GT_DAXMOBILE }} + + - name: Set up ruby env + uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.7.2 + bundler-cache: true + + - name: Decode Play Store credentials file + uses: davidSchuppa/base64Secret-toFile-action@199e78f212c854d2284fada7f3cd3aba3e37d208 + with: + secret: ${{ secrets.UPLOAD_PLAY_CREDENTIALS }} + fileName: api.json + destination-path: $HOME/jenkins_static/com.duckduckgo.mobile.android/ + + - name: Update release notes in Play Store + id: update_play_store_release_notes + run: | + bundle exec fastlane update_release_notes_playstore release_number:${{ github.event.inputs.app-version }} release_notes:"${{ github.event.inputs.release-notes }}" + + - name: Update release notes in Github + id: update_gh_release_notes + run: | + bundle exec fastlane update_release_notes_github release_number:${{ github.event.inputs.app-version }} release_notes:"${{ github.event.inputs.release-notes }}" + + - name: Create Asana task when workflow failed + if: ${{ failure() }} + id: create-failure-task + uses: duckduckgo/native-github-asana-sync@v1.1 + with: + asana-pat: ${{ secrets.GH_ASANA_SECRET }} + asana-project: ${{ vars.GH_ANDROID_APP_PROJECT_ID }} + asana-section: ${{ vars.GH_ANDROID_APP_INCOMING_SECTION_ID }} + asana-task-name: GH Workflow Failure - Update Release Notes + asana-task-description: Update Release Notes in Play Store and Github has failed. See https://github.com/duckduckgo/Android/actions/runs/${{ github.run_id }} + action: 'create-asana-task' \ No newline at end of file diff --git a/.github/workflows/release_update_release_notes.yml b/.github/workflows/release_update_release_notes.yml index a9a1b9ac955a..63293c3f2747 100644 --- a/.github/workflows/release_update_release_notes.yml +++ b/.github/workflows/release_update_release_notes.yml @@ -28,11 +28,6 @@ jobs: submodules: recursive token: ${{ secrets.GT_DAXMOBILE }} - - name: Set Git permissions - uses: oleksiyrudenko/gha-git-credentials@v2-latest - with: - token: '${{ secrets.GT_DAXMOBILE }}' - - name: Set up ruby env uses: ruby/setup-ruby@v1 with: