Inflow Navigation #1583
Workflow file for this run
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
# Fails because of this issue below (add comma's back when we get a fix for this) | |
# https://github.com/gradle/gradle-build-action/issues/758 | |
name: Lint Build and Test | |
on: | |
pull_request: | |
merge_group: | |
push: | |
branches: [ main, develop ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
# Lints code, builds all modules, runs tests, assembles AAR and APK, and publishes Snapshot | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Calculate Snapshot Version | |
id: version | |
# Read version number from the VERSION file and append -SNAPSHOT if not already present | |
run: | | |
VERSION=$(cat ./lib/VERSION) | |
if [[ $VERSION == *"-SNAPSHOT" ]]; then | |
echo "Version $VERSION already contains -SNAPSHOT" | |
echo "version=$VERSION" >> $GITHUB_OUTPUT | |
else | |
echo "Version $VERSION does not contain -SNAPSHOT" | |
echo "version=$VERSION-SNAPSHOT" >> $GITHUB_OUTPUT | |
fi | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Build, Test, Lint, Assemble, Publish Snapshot | |
# NB! The "lint" gradle action here is different than ktLint | |
run: ./gradlew lint build assembleDebug publish | |
env: | |
ORG_GRADLE_PROJECT_VERSION_NAME: ${{ steps.version.outputs.version }} | |
ORG_GRADLE_PROJECT_SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ARTIFACT_GPG_SIGNING_KEY }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.ARTIFACT_GPG_SIGNING_KEY_ID }} | |
- name: Archive SDK AAR | |
uses: actions/upload-artifact@v4 | |
with: | |
name: SDK AAR | |
path: lib/build/outputs/aar/lib-debug.aar | |
- name: Archive Sample App | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Sample App APK | |
path: sample/build/outputs/apk/debug/sample-debug.apk | |
lint: | |
runs-on: ubuntu-latest | |
timeout-minutes: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: musichin/ktlint-check@v3 | |
with: | |
ktlint-version: "1.2.1" |