version: 0.20-SNAPSHOT #378
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [develop] | |
pull_request: | |
branches: [develop] | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Run Check | |
run: ./gradlew detektMainAll check | |
publish: | |
name: Publish | |
needs: check | |
runs-on: ubuntu-latest | |
if: ${{ github.ref == 'refs/heads/develop' }} | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Run Publish | |
run: ./gradlew publishAllPublicationsToGithubPackagesRepository | |
env: | |
ORG_GRADLE_PROJECT_githubPackagesUsername: ${{ github.actor }} | |
ORG_GRADLE_PROJECT_githubPackagesPassword: ${{ secrets.GITHUB_TOKEN }} | |
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }} | |
samples: | |
name: Verify samples | |
needs: check | |
runs-on: ubuntu-latest | |
if: ${{ github.ref != 'refs/heads/develop' }} | |
strategy: | |
matrix: | |
sample: ['android-application', 'android-application-multi'] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Run Publish | |
run: ./gradlew publishToMavenLocal | |
- name: Run Build | |
run: | | |
cd samples/${{ matrix.sample }} | |
./gradlew build |