-
Notifications
You must be signed in to change notification settings - Fork 928
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
144 changed files
with
3,777 additions
and
6,689 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Build - Ad-hoc release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
ref: | ||
description: 'Ref to build APK from (branch, tag, commit)' | ||
required: true | ||
|
||
env: | ||
ASANA_PAT: ${{ secrets.GH_ASANA_SECRET }} | ||
GOOGLE_APPLICATION_CREDENTIALS: '#{ENV["HOME"]}/jenkins_static/com.duckduckgo.mobile.android/ddg-upload-firebase.json' | ||
GH_TOKEN: ${{ secrets.GT_DAXMOBILE }} | ||
|
||
jobs: | ||
build-apk: | ||
name: Generate and upload universal APK to GH Action Run | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
token: ${{ secrets.GT_DAXMOBILE }} | ||
ref: ${{ github.event.inputs.ref }} | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
|
||
- name: Create folder | ||
if: always() | ||
run: mkdir apk | ||
|
||
- name: Decode keys | ||
uses: davidSchuppa/base64Secret-toFile-action@v2 | ||
with: | ||
secret: ${{ secrets.FAKE_RELEASE_PROPERTIES }} | ||
fileName: ddg_android_build.properties | ||
destination-path: $HOME/jenkins_static/com.duckduckgo.mobile.android/ | ||
|
||
- name: Decode key file | ||
uses: davidSchuppa/base64Secret-toFile-action@v2 | ||
with: | ||
secret: ${{ secrets.FAKE_RELEASE_KEY }} | ||
fileName: android | ||
destination-path: $HOME/jenkins_static/com.duckduckgo.mobile.android/ | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
|
||
- name: Assemble release APK | ||
run: ./gradlew assemblePlayRelease -Pforce-default-variant | ||
|
||
- name: Move APK to new folder | ||
run: find . -name "*.apk" -exec mv '{}' apk/release.apk \; | ||
|
||
- name: Upload debug apk | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: release | ||
path: apk/release.apk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ on: | |
env: | ||
ASANA_PAT: ${{ secrets.GH_ASANA_SECRET }} | ||
GH_TOKEN: ${{ secrets.GT_DAXMOBILE }} | ||
emoji_info: ":information_source:" # ℹ️ | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
|
@@ -46,6 +47,16 @@ jobs: | |
run: | | ||
bundle exec fastlane android tag_and_push_release_version app_version:${{ github.event.inputs.app-version }} | ||
- name: Notify Mattermost | ||
id: send-mm-message | ||
uses: duckduckgo/[email protected] | ||
with: | ||
mattermost-token: ${{ secrets.MM_AUTH_TOKEN }} | ||
mattermost-team-id: ${{ secrets.MM_TEAM_ID }} | ||
mattermost-channel-name: ${{ vars.MM_RELEASE_NOTIFY_CHANNEL }} | ||
mattermost-message: ${{env.emoji_start}} Release ${{ github.event.inputs.app-version }}. Tag created. | ||
action: 'send-mattermost-message' | ||
|
||
- name: Create Asana task when workflow failed | ||
if: ${{ failure() }} | ||
id: create-failure-task | ||
|
@@ -56,4 +67,15 @@ jobs: | |
asana-section: ${{ vars.GH_ANDROID_APP_INCOMING_SECTION_ID }} | ||
asana-task-name: GH Workflow Failure - Tag Android Release | ||
asana-task-description: Tag Android Release has failed. See https://github.com/duckduckgo/Android/actions/runs/${{ github.run_id }} | ||
action: 'create-asana-task' | ||
action: 'create-asana-task' | ||
|
||
- name: Notify Mattermost when workflow failed | ||
if: ${{ failure() }} | ||
id: send-mm-message-error | ||
uses: duckduckgo/[email protected] | ||
with: | ||
mattermost-token: ${{ secrets.MM_AUTH_TOKEN }} | ||
mattermost-team-id: ${{ secrets.MM_TEAM_ID }} | ||
mattermost-channel-name: ${{ vars.MM_RELEASE_NOTIFY_CHANNEL }} | ||
mattermost-message: ${{env.emoji_start}} Tag Android Release has failed. See https://github.com/duckduckgo/Android/actions/runs/${{ github.run_id }} | ||
action: 'send-mattermost-message' |
Oops, something went wrong.