Skip to content

Commit 672aba0

Browse files
publish script
1 parent 87335cc commit 672aba0

File tree

4 files changed

+36
-1
lines changed

4 files changed

+36
-1
lines changed

.github/workflows/publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [released]
6+
7+
jobs:
8+
publish:
9+
name: Release build and publish
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out code
13+
uses: actions/[email protected]
14+
- name: Set up JDK 17
15+
uses: actions/[email protected]
16+
with:
17+
distribution: adopt
18+
java-version: '17'
19+
- name: Release build
20+
run: ./gradlew assembleRelease --scan
21+
- name: Publish to MavenCentral
22+
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 --scan
23+
env:
24+
SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
25+
SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
26+
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
27+
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
28+
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
29+
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}

scripts/publish-module.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ artifacts {
2828
archives javadocJar
2929
}
3030

31-
afterEvaluate {
31+
afterEvaluate { project ->
3232
publishing {
3333
publications {
3434
release(MavenPublication) {

storyteller/build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ android {
4444
composeOptions {
4545
kotlinCompilerExtensionVersion = "1.4.7"
4646
}
47+
publishing {
48+
singleVariant("release")
49+
}
4750
}
4851

4952
kotlin{

storyteller_persistence/build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ android {
4040
kotlinOptions {
4141
jvmTarget = "17"
4242
}
43+
publishing {
44+
singleVariant("release")
45+
}
4346
}
4447

4548
kotlin{

0 commit comments

Comments
 (0)