-
Notifications
You must be signed in to change notification settings - Fork 18
85 lines (84 loc) · 3.92 KB
/
scheduled-build.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Daily build for testers at 5 AM UTC (8 AM Moscow Time, 11 AM Bishkek Time)
on:
schedule:
- cron: '0 5 * * *'
jobs:
android-build-artifacts:
name: "Run build feature artifacts"
runs-on: ubuntu-latest
steps:
- name: "Checkout to the current commit hash"
uses: actions/checkout@v3
with:
ref: develop
fetch-depth: 0
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: "Initializing firebase configs"
uses: ./.github/actions/setup-google-services
with:
google-services-content: ${{ secrets.GOOGLE_SERVICE_JSON_SECRET }}
- name: "Initialize project keys"
uses: ./.github/actions/setup-project
with:
amplitude-key-debug: ${{ secrets.AMPLITUDE_KEY_DEBUG }}
amplitude-key-release: ${{ secrets.AMPLITUDE_KEY_RELEASE }}
torus-verifier-debug: ${{ secrets.TORUS_VERIFIER_DEBUG }}
torus-verifier-feature: ${{ secrets.TORUS_VERIFIER_FEATURE }}
torus-sub-verifier-feature: ${{ secrets.TORUS_SUB_VERIFIER_FEATURE }}
torus-verifier-release: ${{ secrets.TORUS_VERIFIER_RELEASE }}
rpc-pool-key: ${{ secrets.RPC_POOL_API_KEY }}
moonpay-key: ${{ secrets.MOONPAY_KEY }}
moonpay-sandbox-key: ${{ secrets.MOONPAY_SANDBOX_KEY }}
intercom-key: ${{ secrets.INTERCOM_API_KEY }}
intercom-app-id: ${{ secrets.INTERCOM_APP_ID }}
apps-flyer-key: ${{ secrets.APPS_FLYER_KEY }}
compare-key: ${{ secrets.COMPARE_PUBLIC_KEY }}
sentry-auth-token: ${{ secrets.SENTRY_AUTH_TOKEN }}
sentry-auth-dsn: ${{ secrets.SENTRY_AUTH_DSN }}
lokalise-key: ${{ secrets.LOKALISE_KEY }}
lokalise-app-id: ${{ secrets.LOKALISE_APP_ID }}
svl-memo-send: ${{ secrets.SVL_MEMO_SEND }}
svl-memo-claim: ${{ secrets.SVL_MEMO_CLAIM }}
salt-prefix: ${{ secrets.SALT_PREFIX }}
- name: "Generate changelog"
uses: ./.github/actions/setup-changelog
with:
current-ref-name: "develop"
workflow-type: "scheduled"
- name: "Send start deploy message to slack"
run: bash bash_scripts/slack_start_message.sh ${{ secrets.SLACK_BOT_TOKEN }} ${{ secrets.SLACK_CHANNEL_ID }}
- name: "Generate a unique version build"
uses: ./.github/actions/setup-version-build
- name: "Build feature APK"
run: ./gradlew assembleFeature
- name: "Upload APK to Firebase (Feature)"
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }}
run: ./gradlew appDistributionUploadFeature
- name: "Upload APK to Slack (Feature)"
uses: ./.github/actions/setup-slack
with:
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
build-type: "feature"
artifact-type: "apk"
workflow-type: "daily"
- name: "Upload APK to BrowserStack (Feature)"
run: |
credentials=${{ secrets.BROWSER_STACK_CREDENTIALS }}
curl -u "${credentials}" \
-X POST "https://api-cloud.browserstack.com/app-automate/upload" \
-F "file=@$(find app/build/outputs/apk/feature -name 'key-app*')" \
-F "custom_id=KeyApp_dev.apk"
- name: "Upload changelog, and Jira ticket to slack channel"
run: bash bash_scripts/slack_upload_changelog.sh ${{ secrets.SLACK_BOT_TOKEN }} ${{ secrets.SLACK_CHANNEL_ID }} CHANGELOG.txt
- name: "Send finish deploy message to slack"
run: |
value=`cat timestamp.txt`
bash bash_scripts/slack_finish_message.sh ${{ secrets.SLACK_BOT_TOKEN }} ${{ secrets.SLACK_CHANNEL_ID }} $value
- name: "Commit and Push changes"
uses: ./.github/actions/setup-commit
with:
github-author-email: ${{ vars.GIT_AUTHOR_EMAIL }}
github-commit-message: "[CI-processing] - Automated scheduled build"