diff --git a/.github/workflows/hotfix.yml b/.github/workflows/hotfix.yml index 9a3f3afee4..0f0dbe150b 100644 --- a/.github/workflows/hotfix.yml +++ b/.github/workflows/hotfix.yml @@ -33,25 +33,32 @@ jobs: - name: Prepare fastlane run: bundle install + - name: Find last release version + id: find_last_release + env: + GH_TOKEN: ${{ github.token }} + run: | + last_release="$(gh api repos/${{ github.repository }}/releases/latest | jq -r .tag_name)" + echo "last_release=$last_release" >> $GITHUB_OUTPUT + - name: Make release branch id: make_release_branch env: APPLE_API_KEY_BASE64: ${{ secrets.APPLE_API_KEY_BASE64 }} APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }} APPLE_API_KEY_ISSUER: ${{ secrets.APPLE_API_KEY_ISSUER }} - GH_TOKEN: ${{ github.token }} + LAST_RELEASE: ${{ steps.find_last_release.outputs.last_release }} run: | git config --global user.name "Dax the Duck" git config --global user.email "dax@duckduckgo.com" - last_release="$(gh api repos/${{ github.repository }}/releases/latest | jq -r .tag_name)" - echo "last_release=$last_release" >> $GITHUB_OUTPUT - bundle exec fastlane prepare_hotfix version:"$last_release" + bundle exec fastlane prepare_hotfix version:"$LAST_RELEASE" - name: Create release task id: create_release_task env: ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }} run: | + exit 1 version="$(echo ${{ steps.make_release_branch.outputs.release_branch_name }} | cut -d '/' -f 2)" task_name="macOS App Hotfix Release $version" asana_task_id="$(curl -fLSs -X POST "https://app.asana.com/api/1.0/task_templates/${{ vars.MACOS_HOTFIX_TASK_TEMPLATE_ID }}/instantiateTask" \ @@ -82,7 +89,7 @@ jobs: uses: ./.github/actions/asana-add-comment env: BRANCH: ${{ steps.make_release_branch.outputs.release_branch_name }} - RELEASE_TAG: ${{ steps.make_release_branch.outputs.last_release }} + RELEASE_TAG: ${{ steps.find_last_release.outputs.last_release }} WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} with: access-token: ${{ secrets.ASANA_ACCESS_TOKEN }}