-
Notifications
You must be signed in to change notification settings - Fork 0
Release process #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
3c06c84
Update .gitignore
JcMinarro c362be1
Add Configuration file
JcMinarro 0f49cce
Remove android dependencies
JcMinarro b2bdd72
Add Dokka plugin
JcMinarro 2780eea
Create scripts to publish to maven
JcMinarro ea8fd88
Add Nexus Plugin
JcMinarro 534f988
Configure publish script on every module
JcMinarro bb3e98f
Add github action to publish a new version
JcMinarro bc0529b
Merge branch 'develop' into release-process
aleksandar-apostolov fd4935f
Merge branch 'develop' into release-process
aleksandar-apostolov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| name: Publish New Version | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| bump: | ||
| type: choice | ||
| description: "Type of version bump to perform" | ||
| options: | ||
| - patch | ||
| - minor | ||
| - major | ||
|
|
||
| jobs: | ||
| pre_release_check: | ||
| name: Pre release check | ||
| runs-on: ubuntu-24.04 | ||
| environment: 'publish' | ||
| steps: | ||
| - name: Check | ||
| id: pre_release_check_step | ||
| run: echo "Pre release check" | ||
| publish: | ||
| needs: pre_release_check | ||
| uses: GetStream/android-ci-actions/.github/workflows/release-new-version.yml@main | ||
| with: | ||
| ref: "develop" | ||
| bump: ${{ inputs.bump }} | ||
| file-path: ./buildSrc/src/main/kotlin/io/getstream/core/Configuration.kt | ||
| excluded-modules: "app" | ||
| secrets: | ||
| OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
| OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | ||
| SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | ||
| SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | ||
| SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | ||
| SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} | ||
| STREAM_PUBLIC_BOT_TOKEN: ${{ secrets.STREAM_PUBLIC_BOT_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| plugins { | ||
| `kotlin-dsl` | ||
| } | ||
|
|
||
| repositories { | ||
| mavenCentral() | ||
| } |
29 changes: 29 additions & 0 deletions
29
buildSrc/src/main/kotlin/io/getstream/core/Configuration.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| /* | ||
| * Copyright (c) 2014-2025 Stream.io Inc. All rights reserved. | ||
| * | ||
| * Licensed under the Stream License; | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * https://github.com/GetStream/stream-feeds-android/blob/main/LICENSE | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| package io.getstream.core | ||
|
|
||
| object Configuration { | ||
| const val compileSdk = 36 | ||
| const val targetSdk = 36 | ||
| const val sampleTargetSdk = 36 | ||
| const val minSdk = 21 | ||
| const val majorVersion = 0 | ||
| const val minorVersion = 0 | ||
| const val patchVersion = 1 | ||
| const val versionName = "$majorVersion.$minorVersion.$patchVersion" | ||
| const val snapshotVersionName = "$majorVersion.$minorVersion.${patchVersion + 1}-SNAPSHOT" | ||
| const val artifactGroup = "io.getstream" | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| apply plugin: 'maven-publish' | ||
| apply plugin: 'signing' | ||
| apply plugin: 'org.jetbrains.dokka' | ||
|
|
||
| tasks.register('androidSourcesJar', Jar) { | ||
| archiveClassifier.set('sources') | ||
| if (project.plugins.findPlugin("com.android.library")) { | ||
| from android.sourceSets.main.java.srcDirs | ||
| from android.sourceSets.main.kotlin.srcDirs | ||
| } else { | ||
| from sourceSets.main.java.srcDirs | ||
| from sourceSets.main.kotlin.srcDirs | ||
| } | ||
| } | ||
|
|
||
| tasks.withType(dokkaHtmlPartial.getClass()).configureEach { | ||
| pluginsMapConfiguration.set( | ||
| ["org.jetbrains.dokka.base.DokkaBase": """{ "separateInheritedMembers": true}"""] | ||
| ) | ||
| } | ||
|
|
||
| task javadocJar(type: Jar, dependsOn: dokkaJavadoc) { | ||
| archiveClassifier.set('javadoc') | ||
| from dokkaJavadoc.outputDirectory | ||
| } | ||
|
|
||
| artifacts { | ||
| archives androidSourcesJar | ||
| archives javadocJar | ||
| } | ||
|
|
||
| group = PUBLISH_GROUP_ID | ||
| version = PUBLISH_VERSION | ||
|
|
||
| afterEvaluate { | ||
| publishing { | ||
| publications { | ||
| release(MavenPublication) { | ||
| tasks.named("generateMetadataFileForReleasePublication").configure { dependsOn("androidSourcesJar") } | ||
| groupId PUBLISH_GROUP_ID | ||
| artifactId PUBLISH_ARTIFACT_ID | ||
| version PUBLISH_VERSION | ||
| if (project.plugins.findPlugin("com.android.library")) { | ||
| from components.release | ||
| } else { | ||
| from components.java | ||
| } | ||
|
|
||
| artifact javadocJar | ||
|
|
||
| pom { | ||
| name = PUBLISH_ARTIFACT_ID | ||
| description = 'Stream Core official Android SDK' | ||
| url = 'https://github.com/getstream/stream-android-core' | ||
| licenses { | ||
| license { | ||
| name = 'Stream License' | ||
| url = 'https://github.com/GetStream/stream-android-core/blob/main/LICENSE' | ||
| } | ||
| } | ||
| developers { | ||
| developer { | ||
| id = 'jcminarro' | ||
| name = 'Jc Miñarro' | ||
| email = '[email protected]' | ||
| } | ||
| developer { | ||
| id = 'aleksandar-apostolov' | ||
| name = 'Aleksandar Apostolov' | ||
| email = '[email protected]' | ||
| } | ||
| developer { | ||
| id = 'VelikovPetar' | ||
| name = 'Petar Velikov' | ||
| email = '[email protected]' | ||
| } | ||
| developer { | ||
| id = 'andremion' | ||
| name = 'André Mion' | ||
| email = '[email protected]' | ||
| } | ||
| developer { | ||
| id = 'rahul-lohra' | ||
| name = 'Rahul Kumar Lohra' | ||
| email = '[email protected]' | ||
| } | ||
| developer { | ||
| id = 'gpunto' | ||
| name = 'Gianmarco' | ||
| email = '[email protected]' | ||
| } | ||
| } | ||
| scm { | ||
| connection = 'scm:git:github.com/getstream/stream-android-core.git' | ||
| developerConnection = 'scm:git:ssh://github.com/getstream/stream-android-core.git' | ||
| url = 'https://github.com/getstream/stream-android-core/tree/main' | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| signing { | ||
| useInMemoryPgpKeys( | ||
| rootProject.ext["signing.keyId"], | ||
| rootProject.ext["signing.key"], | ||
| rootProject.ext["signing.password"], | ||
| ) | ||
| sign publishing.publications | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| import io.getstream.core.Configuration | ||
|
|
||
| // Create variables with empty default values | ||
| ext["ossrhUsername"] = '' | ||
| ext["ossrhPassword"] = '' | ||
| ext["sonatypeStagingProfileId"] = '' | ||
| ext["signing.keyId"] = '' | ||
| ext["signing.password"] = '' | ||
| ext["signing.key"] = '' | ||
| ext["snapshot"] = '' | ||
|
|
||
| File secretPropsFile = project.rootProject.file('local.properties') | ||
| if (secretPropsFile.exists()) { | ||
| // Read local.properties file first if it exists | ||
| Properties p = new Properties() | ||
| new FileInputStream(secretPropsFile).withCloseable { is -> p.load(is) } | ||
| p.each { name, value -> ext[name] = value } | ||
| } else { | ||
| // Use system environment variables | ||
| ext["ossrhUsername"] = System.getenv('OSSRH_USERNAME') | ||
| ext["ossrhPassword"] = System.getenv('OSSRH_PASSWORD') | ||
| ext["sonatypeStagingProfileId"] = System.getenv('SONATYPE_STAGING_PROFILE_ID') | ||
| ext["signing.keyId"] = System.getenv('SIGNING_KEY_ID') | ||
| ext["signing.password"] = System.getenv('SIGNING_PASSWORD') | ||
| ext["signing.key"] = System.getenv('SIGNING_KEY') | ||
| ext["snapshot"] = System.getenv('SNAPSHOT') | ||
| } | ||
|
|
||
| if (snapshot) { | ||
| ext["rootVersionName"] = Configuration.snapshotVersionName | ||
| } else { | ||
| ext["rootVersionName"] = Configuration.versionName | ||
| } | ||
|
|
||
| // Set up Sonatype repository | ||
| nexusPublishing { | ||
| repositories { | ||
| sonatype { | ||
| nexusUrl = uri("https://ossrh-staging-api.central.sonatype.com/service/local/") | ||
| snapshotRepositoryUrl = uri("https://central.sonatype.com/repository/maven-snapshots/") | ||
| stagingProfileId = sonatypeStagingProfileId | ||
| username = ossrhUsername | ||
| password = ossrhPassword | ||
| version = rootVersionName | ||
| } | ||
| } | ||
| } | ||
|
|
||
| tasks.register("printAllArtifacts") { | ||
| group = "publishing" | ||
|
|
||
| doLast { | ||
| subprojects.each { subproject -> | ||
| subproject.plugins.withId("maven-publish") { | ||
| def publishingExtension = subproject.extensions.findByType(PublishingExtension) | ||
| publishingExtension?.publications?.all { publication -> | ||
| if (publication instanceof MavenPublication) { | ||
| def groupId = publication.groupId | ||
| def artifactId = publication.artifactId | ||
| def version = publication.version | ||
| println("$groupId:$artifactId:$version") | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.