Skip to content

Update dependency org.jetbrains.kotlinx:kotlinx-serialization-json to… #169

Update dependency org.jetbrains.kotlinx:kotlinx-serialization-json to…

Update dependency org.jetbrains.kotlinx:kotlinx-serialization-json to… #169

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- v*
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build app
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: adopt
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build app
run: ./gradlew :app:testReleaseUnitTest :app:bundleRelease
# Sign app bundle and create release for tags
- name: Sign app bundle
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'LiveTL/android'
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/bundle/release
signingKeyBase64: ${{ secrets.KEY_B64 }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.PASSWORD }}
keyPassword: ${{ secrets.PASSWORD }}
- name: Prepare build metadata
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'LiveTL/android'
run: |
set -x
echo "VERSION_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
if [[ "${{ github.event.ref }}" =~ "-beta" ]]
then
echo "GOOGLE_PLAY_TRACK=beta" >> $GITHUB_ENV
else
echo "GOOGLE_PLAY_TRACK=production" >> $GITHUB_ENV
fi
- name: Create release
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'LiveTL/android'
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.VERSION_TAG }}
name: LiveTL for Android ${{ env.VERSION_TAG }}
files: |
${{ env.SIGNED_RELEASE_FILE }}
draft: true
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to Google Play
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'LiveTL/android'
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}
packageName: com.livetl.android
releaseFiles: ${{ env.SIGNED_RELEASE_FILE }}
# mappingFile: app/build/outputs/mapping/release/mapping.txt
track: ${{ env.GOOGLE_PLAY_TRACK }}
whatsNewDirectory: distribution/whatsnew