Skip to content

Commit a19a157

Browse files
authored
GHA: Unify release steps (#6768)
Task/Issue URL: https://app.asana.com/1/137249556945/project/1174433894299346/task/1209260135863905?focus=true ### Description This PR creates a new release workflow with all the steps
1 parent 391ab0a commit a19a157

File tree

5 files changed

+80
-1
lines changed

5 files changed

+80
-1
lines changed

.github/workflows/release_create_tag.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: Release - Create and Push Tag
22

33
on:
4+
workflow_call:
5+
inputs:
6+
app-version:
7+
description: 'App Version for Release'
8+
required: true
49
workflow_dispatch:
510
inputs:
611
app-version:

.github/workflows/release_create_task.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: Release - Create Release Task in Asana
22

33
on:
4+
workflow_call:
5+
inputs:
6+
app-version:
7+
description: 'App Version for Release'
8+
required: true
49
workflow_dispatch:
510
inputs:
611
app-version:
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Production Release to Play Store and Github
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
app-version:
7+
description: 'Ref to build APK from (branch, tag, commit)'
8+
required: true
9+
10+
env:
11+
ASANA_PAT: ${{ secrets.ASANA_ACCESS_TOKEN }}
12+
GH_TOKEN: ${{ secrets.GT_DAXMOBILE }}
13+
GOOGLE_APPLICATION_CREDENTIALS: '#{ENV["HOME"]}/jenkins_static/com.duckduckgo.mobile.android/ddg-upload-firebase.json'
14+
15+
jobs:
16+
trigger-asana-task-creation:
17+
name: Trigger Create Asana Task
18+
uses: ./.github/workflows/release_create_task.yml
19+
with:
20+
input: ${{ github.event.inputs.app-version }}
21+
22+
trigger-tag-creation:
23+
name: Trigger Create Git Tag
24+
uses: ./.github/workflows/release_create_tag.yml
25+
needs: trigger-asana-task-creation
26+
with:
27+
ref: ${{ github.event.inputs.app-version }}
28+
29+
trigger-release-tests:
30+
name: Trigger Run Release Tests
31+
uses: ./.github/workflows/release_tests.yml
32+
needs: trigger-tag-creation
33+
with:
34+
app-version: ${{ github.event.inputs.app-version }}
35+
test-tag: 'releaseTest'
36+
37+
trigger-upload-play-store-github:
38+
name: Trigger Upload to Play Store and Github
39+
uses: ./.github/workflows/release_upload_play_store.yml
40+
needs: trigger-release-tests
41+
with:
42+
ref: ${{ github.event.inputs.app-version }}
43+
44+
trigger-upload-internal:
45+
name: Trigger Internal Release
46+
uses: ./.github/workflows/release_upload_internal.yml
47+
needs: trigger-upload-play-store-github
48+
49+
trigger-asana-error-task-creation:
50+
name: Create Asana task when workflow failed
51+
if: ${{ failure() }}
52+
uses: duckduckgo/[email protected]
53+
with:
54+
asana-project: ${{ vars.GH_ANDROID_APP_PROJECT_ID }}
55+
asana-section: ${{ vars.GH_ANDROID_APP_INCOMING_SECTION_ID }}
56+
asana-task-name: GH Workflow Failure - Release Production
57+
asana-task-description: The Release Production workflow has failed. See https://github.com/duckduckgo/Android/actions/runs/${{ github.run_id }}
58+
action: 'create-asana-task'
59+
secrets:
60+
asana-pat: ${{ secrets.ASANA_ACCESS_TOKEN }}

.github/workflows/release_tests.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
name: Release - Run E2E Maestro Tests
22

33
on:
4+
workflow_call:
5+
inputs:
6+
app-version:
7+
description: 'App Version for Testing'
8+
required: true
9+
test-tag:
10+
description: 'Maestro Tests tag to include'
11+
required: true
12+
413
workflow_dispatch:
514
inputs:
615
app-version:

.github/workflows/release_upload.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release - Production Release to Play Store and Github
1+
name: Release - Production Release to Play Store Production, Github and Internal
22

33
on:
44
workflow_dispatch:

0 commit comments

Comments
 (0)