-
-
Notifications
You must be signed in to change notification settings - Fork 97
53 lines (44 loc) · 1.77 KB
/
android.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
name: Android CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches:
- 'master'
- 'release/**'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Copy environment variables
env:
RELEASE_KEYSTORE_BASE64: ${{ secrets.RELEASE_KEYSTORE_BASE64 }}
RELEASE_KEYSTORE_ALIAS: ${{ secrets.RELEASE_KEYSTORE_ALIAS }}
RELEASE_KEYSTORE_PASSWORD: ${{ secrets.RELEASE_KEYSTORE_PASSWORD }}
run: ./.github/scripts/copy_env_variables.sh
- name: Build with Gradle
if: ${{ github.repository_owner == 'anggrayudi' }}
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSS_SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSS_SONATYPE_NEXUS_PASSWORD }}
run: ./gradlew build test check
- name: Build with Gradle (default)
if: ${{ github.repository_owner != 'anggrayudi' }}
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: 'abc'
ORG_GRADLE_PROJECT_mavenCentralPassword: 'xyz'
run: ./gradlew build test check
- name: Upload snapshot archives
if: ${{ github.repository_owner == 'anggrayudi' }}
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSS_SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSS_SONATYPE_NEXUS_PASSWORD }}
run: ./.github/scripts/deploy_snapshot.sh