-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathandroidpullrequestormasterchange.yml
More file actions
89 lines (75 loc) · 3.2 KB
/
androidpullrequestormasterchange.yml
File metadata and controls
89 lines (75 loc) · 3.2 KB
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
86
87
88
89
name: Android CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout from Git
uses: actions/checkout@v2
- name: Read full CHANGELOG
id: changelog
run: echo "::set-output name=body::$(cat changelog.md)"
- name: Read CHANGELOG for only the latest version
id: changelogLatest
run: |
echo "::echo::on"
CHANGELOG=""$(grep -A 9999 "## " changelog.md | grep -B 9999 -m2 "## " | sed '$d' | sed '$d' | sed 's/## //g')""
echo ""Got changelog: $CHANGELOG""
echo 'CHANGELOG_LATEST<<EOF' >> $GITHUB_ENV
echo ""$CHANGELOG"" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Test latest version CHANGELOG output
run: echo "${{ env.CHANGELOG_LATEST }}"
- uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Gradle dependencies
uses: actions/cache@v2
with:
path: ~/.gradle
key: ${{ runner.os }}-gradle-full-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-full-
- name: Insert AWS credentials to enable build
id: insertAwsCreds
run: |
sed -i 's/accessKey = "PLEASE_LOOK_FOR_CREDENTIALS_AND_CONFIGURATION"/accessKey = "${{ secrets.AWS_S3_ACCESS_KEY_ID }}"/g' build.gradle
sed -i 's/secretKey = "PLEASE_LOOK_FOR_CREDENTIALS_AND_CONFIGURATION"/secretKey = "${{ secrets.AWS_S3_ACCESS_KEY }}"/g' build.gradle
- name: Build with Gradle
id: build
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_ACCESS_KEY }}
run: ./gradlew assembleDebug -x lint
- name: Organize artifacts in folder
run: |
mkdir -p ${{ github.workspace }}/artifact
cp -v performTenant2faValidation.* ${{ github.workspace }}/artifact/
cp -v README.md ${{ github.workspace }}/artifact/
cp -v iwasdksampleapp/build/outputs/apk/debug/iwasdksampleapp-debug.apk ${{ github.workspace }}/artifact/iwa_sdk_sample_app.apk
- name: Upload Release artifact folder
id: upload
uses: actions/upload-artifact@v2
with:
name: IWA_SDK_Sample_App_Package
path: ${{ github.workspace }}/artifact/**/*
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2.0.2
env:
SLACK_CHANNEL: android-dev-botfeed
SLACK_COLOR: '#3278BD'
SLACK_ICON: https://github.com/rtCamp.png?size=48
SLACK_TITLE: New IWA SDK Sample App
SLACK_MESSAGE: |
New IWA SDK Sample App test build available on Github Artifacts :rocket:
<https://github.com/ImageWare/jumpstart_sample_android/actions/runs/${{ github.run_id }}|Build job and Artifacts>
<https://imageware.atlassian.net/wiki/spaces/MA/pages/755204122/How+To+Integrate+Sample+App+Details|How To Use Sample App>
<https://imageware.atlassian.net/wiki/spaces/MA/pages/704938246/Integration.txt+for+adding+GMI+SDK+libraries+to+an+app|SDK integration.txt>
```Changelog:
${{ env.CHANGELOG_LATEST }}```
SLACK_USERNAME: GithubActions
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}