Skip to content

bump up version (#457) #1616

bump up version (#457)

bump up version (#457) #1616

Workflow file for this run

# 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"