Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

Commit 24ef128

Browse files
committed
chore: publish snapshots to maven central on push
1 parent 7c0a025 commit 24ef128

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,19 @@ jobs:
3737
- name: Setup Gradle
3838
uses: gradle/gradle-build-action@v2
3939

40-
- name: Build shared libraries + APK
40+
- name: Build project
4141
shell: bash
4242
run: |
4343
chmod +x ./gradlew
4444
./gradlew build
4545
env:
4646
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
4747

48+
- name: Publish snapshots
49+
shell: bash
50+
run: |
51+
./gradlew publishAllPublicationsToMavenCentralRepository
52+
4853
- name: Upload sample app
4954
uses: actions/upload-artifact@v3
5055
if: ${{ !github.head_ref }}

.idea/vcs.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle.kts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ subprojects {
5151
plugins.withId("com.vanniktech.maven.publish.base") {
5252
configure<MavenPublishBaseExtension> {
5353
group = "io.github.itsaky"
54-
version = project.findProperty("VERSION_NAME")!!
54+
var versionName = project.findProperty("VERSION_NAME")!!
55+
if (!hasProperty("publishRelease")) {
56+
versionName = "$versionName-SNAPSHOT"
57+
}
58+
version = versionName
5559
pomFromGradleProperties()
5660
publishToMavenCentral(SonatypeHost.S01)
5761
signAllPublications()

0 commit comments

Comments
 (0)