-
Notifications
You must be signed in to change notification settings - Fork 921
63 lines (53 loc) · 2.14 KB
/
release_create_task.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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'