Skip to content

chore(deps): update kotlin #2014

chore(deps): update kotlin

chore(deps): update kotlin #2014

Workflow file for this run

name: Android CI
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
jobs:
test:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: gradle-${{ runner.os }}-${{ hashFiles('**.gradle', '**/**.gradle', '**/gradle/wrapper/gradle-wrapper.properties') }}
- name: set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Unit tests
run: bash ./gradlew testDebug --stacktrace
lint:
name: Run lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: gradle-${{ runner.os }}-${{ hashFiles('**.gradle', '**/**.gradle', '**/gradle/wrapper/gradle-wrapper.properties') }}
- name: set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Lint
run: bash ./gradlew lintVitalRelease
build:
name: Generate apk
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: gradle-${{ runner.os }}-${{ hashFiles('**.gradle', '**/**.gradle', '**/gradle/wrapper/gradle-wrapper.properties') }}
- name: set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Build debug apk
run: bash ./gradlew :app:assembleDebug
- name: Upload APK artifact
uses: actions/upload-artifact@v4
with:
name: debug apk
path: ${{ github.workspace }}/app/build/outputs/apk/debug/*.apk
- name: Update debug tag
if: (github.event_name == 'push' && github.ref == 'refs/heads/develop')
uses: richardsimko/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: debug
- name: Update debug release
if: (github.event_name == 'push' && github.ref == 'refs/heads/develop')
uses: ncipollo/[email protected]
with:
tag: debug
name: Debug APK
artifacts: ${{ github.workspace }}/app/build/outputs/apk/debug/DankChat-debug.apk
allowUpdates: true
build-release:
name: Generate signed release apk
runs-on: ubuntu-latest
environment: release
if: (github.event_name == 'push' && github.ref == 'refs/heads/develop')
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: gradle-${{ runner.os }}-${{ hashFiles('**.gradle', '**/**.gradle', '**/gradle/wrapper/gradle-wrapper.properties') }}
- name: set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Decode Keystore
id: decode_keystore
uses: timheuer/[email protected]
with:
fileName: '/app/keystore/DankChat.jks'
fileDir: ${{ github.workspace }}
encodedString: ${{ secrets.SIGNING_KEY }}
- name: Build signed release apk
run: bash ./gradlew app:assembleRelease
env:
SIGNING_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
- name: Upload APK artifact
uses: actions/upload-artifact@v4
with:
name: Signed release apk
path: ${{ github.workspace }}/app/build/outputs/apk/release/*.apk
- name: Update release tag
uses: richardsimko/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: release
- name: Update signed release
uses: ncipollo/[email protected]
with:
tag: release
name: Signed release APK
artifacts: ${{ github.workspace }}/app/build/outputs/apk/release/*.apk
allowUpdates: true