-
Notifications
You must be signed in to change notification settings - Fork 2
36 lines (29 loc) · 1.17 KB
/
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
name: Android CI
on: [ push ]
jobs:
build:
runs-on: ubuntu-latest
if: github.repository == 'simonnorberg/kortholt'
timeout-minutes: 30
env:
TERM: dumb
ORG_GRADLE_PROJECT_OSSRH_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_OSSRH_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_SONATYPE_STAGING_PROFILE_ID: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_STAGING_PROFILE_ID }}
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }}
ORG_GRADLE_PROJECT_SIGNING_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PASSWORD }}
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
- name: Set up JDK
uses: actions/setup-java@v4.6.0
with:
distribution: 'zulu'
java-version: 21
- name: Update submodules
run: git submodule update --init --recursive
- name: Build and publish
run: ./gradlew ktlintCheck lintDebug publishToMavenLocal
- name: Upload release
if: startsWith(github.ref, 'refs/heads/develop')
run: ./gradlew publishReleasePublicationToSonatypeRepository