Skip to content

Release - Create Release Task in Asana #3

Release - Create Release Task in Asana

Release - Create Release Task in Asana #3

name: Release - Create Release Task in Asana
on:
workflow_dispatch:
inputs:
app-version:
description: 'App Version for Release'
required: true
default: 'PLACEHOLDER'
env:
ASANA_PAT: ${{ secrets.GH_ASANA_SECRET }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
create_release_task:
name: Create Android App Release Task in Asana
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check app-version value
run: |
if [ "${{ github.event.inputs.app-version }}" == "PLACEHOLDER" ]; then
echo "Input value cannot be 'PLACEHOLDER'."
exit 1
else
echo "Input value is valid: ${{ github.event.inputs.app-version }}"
fi
- name: Install Release Bridge from Homebrew
run: |
brew tap cdrussell/aarb
brew install aarb
- name: Create task in Asana
run: |
AndroidAsanaBridge version=${{ github.event.inputs.app-version }} action=createRelease,tagPendingTasks,addLinksToDescription,removePendingTasks
- name: Assign task to Github Actor
id: assign-release-task
uses: ./.github/actions/assign-release-task
with:
task_name: 'Android Release ${{ github.event.inputs.app-version }}'
asana_token: ${{ secrets.GH_ASANA_SECRET }}
project_gid: ${{ vars.GH_ANDROID_RELEASE_BOARD_PROJECT_ID }}
username: ${{ github.actor }}
- name: Create Asana task when workflow failed
if: ${{ failure() }}
uses: duckduckgo/[email protected]
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 - Create Android App Release Task
asana-task-description: The Create Android App Release Task workflow has failed. See https://github.com/duckduckgo/Android/actions/runs/${{ github.run_id }}
action: 'create-asana-task'