Skip to content

Commit bc3bc5a

Browse files
committed
Update project
1 parent ec3b832 commit bc3bc5a

2 files changed

Lines changed: 11 additions & 15 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515

1616
jobs:
1717
job-common:
18-
runs-on: ubuntu-latest
18+
runs-on: ubuntu-24.04
1919
outputs:
2020
SHORT_SHA: ${{ steps.expose_sha.outputs.short_sha }}
2121
steps:
@@ -28,7 +28,7 @@ jobs:
2828
2929
build-android:
3030
needs: job-common
31-
runs-on: ubuntu-latest
31+
runs-on: ubuntu-24.04
3232
timeout-minutes: 60
3333
env:
3434
SHORT_SHA: ${{ needs.job-common.outputs.SHORT_SHA }}
@@ -73,17 +73,9 @@ jobs:
7373
path: |
7474
app/build/outputs/apk
7575
76-
- name: expose version name
77-
id: version_name
78-
run: |
79-
VERSION_NAME=$(./gradlew printVersionName -q)
80-
echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV
81-
82-
- name: expose version code
83-
id: version_code
84-
run: |
85-
VERSION_CODE=$(./gradlew printVersionCode -q)
86-
echo "VERSION_CODE=$VERSION_CODE" >> $GITHUB_ENV
76+
- name: expose version
77+
id: version
78+
run: ./gradlew -q printVersion | tee -a $GITHUB_ENV | tee -a $GITHUB_OUTPUT
8779

8880
- name: expose apk path
8981
run: |

app/build.gradle.kts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,9 @@ dependencies {
5353
api(libs.androidx.core.splashscreen)
5454
}
5555

56-
tasks.register("printVersionName") { doLast { println(android.defaultConfig.versionName) } }
57-
tasks.register("printVersionCode") { doLast { println(android.defaultConfig.versionCode.toString()) } }
56+
tasks.register("printVersion") {
57+
doLast {
58+
println("VERSION_NAME=${android.defaultConfig.versionName}")
59+
println("VERSION_CODE=${android.defaultConfig.versionCode}")
60+
}
61+
}

0 commit comments

Comments
 (0)