-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (44 loc) · 1.66 KB
/
continuous-integration.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
name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v2
- name: Make Gradle wrapper executable
run: chmod +x ./gradlew
- uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "17"
- name: Restore gradle.properties
env:
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
SIGNING_KEY_RING_FILE: ${{ secrets.SIGNING_KEY_RING_FILE }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_URL: ${{ secrets.SONATYPE_URL }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
shell: bash
run: |
mkdir -p ~/.gradle/
echo signing.keyId=${SIGNING_KEY_ID} >> ~/.gradle/gradle.properties
echo signing.password=${SIGNING_KEY_PASSWORD} >> ~/.gradle/gradle.properties
echo signing.secretKeyRingFile=${SIGNING_KEY_RING_FILE} >> ~/.gradle/gradle.properties
echo sonatypePassword=${SONATYPE_PASSWORD} >> ~/.gradle/gradle.properties
echo sonatypeUrl=${SONATYPE_URL} >> ~/.gradle/gradle.properties
echo sonatypeUsername=${SONATYPE_USERNAME} >> ~/.gradle/gradle.properties
cat ~/.gradle/gradle.properties
- name: Run lint checks on entire project
run: ./gradlew ktfmtCheck
- name: Unit test the library module
run: ./gradlew :lighthouse:test
- name: Build release version of library
run: ./gradlew :lighthouse:assembleRelease