-
Notifications
You must be signed in to change notification settings - Fork 5
52 lines (46 loc) · 1.93 KB
/
android-cicd.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
name: Build and Verify
# Builds, tests, and publishes dev builds of Android SDKs. The CD destination and CI configuration are handled by your gradle files. You only invoke tasks here
# ** Building multiple modules? If one depends on another, you'll have to build the dependencies in one step and the rest in another.
# See below for more info
# REPOSITORY SECRETS REQUIRED: (see https://docs.github.com/en/actions/security-guides/encrypted-secrets)
# "ARTIFACTORY_EMAIL": an artifactory account email with publish permissions for the destination artifactory
# "ARTIFACTORY_PASSWORD": the password for the artifactory account
on:
push:
jobs:
build-aars:
name: Build & Publish Dev Artifacts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
# This step will build all modules configured for publication and publish them
# Does your project publish multiple libraries in a dependency chain? You'll have to add another copy of this step and build the dependency in the first one
- name: Build and Publish to Dev Repo
uses: gradle/[email protected]
with:
arguments: artifactoryPublish
env:
ORG_GRADLE_PROJECT_artifactory_user: ${{ secrets.ARTIFACTORY_EMAIL }}
ORG_GRADLE_PROJECT_artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
GH_USER: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
unit-tests:
name: Run Unit Tests
runs-on: ubuntu-latest
needs: build-aars
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Unit Tests
uses: gradle/[email protected]
with:
arguments: test