diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 6464a2b65..049df29a0 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -21,7 +21,7 @@ jobs: permissions: contents: read pull-requests: read - uses: GetStream/stream-build-conventions-android/.github/workflows/android-ci.yml@9ea4d20d64f99a1a05dd8c8f56504e5e2aa39ed7 + uses: GetStream/stream-build-conventions-android/.github/workflows/android-ci.yml@161dace284ff29473ea607bf26f436f6bb46c057 secrets: BUILD_CACHE_AWS_REGION: ${{ secrets.BUILD_CACHE_AWS_REGION }} BUILD_CACHE_AWS_BUCKET: ${{ secrets.BUILD_CACHE_AWS_BUCKET }} diff --git a/.github/workflows/pr-clean-stale.yaml b/.github/workflows/pr-clean-stale.yaml index 66a6fb391..b0e2fccbd 100644 --- a/.github/workflows/pr-clean-stale.yaml +++ b/.github/workflows/pr-clean-stale.yaml @@ -11,5 +11,5 @@ permissions: jobs: pr-clean-stale: - uses: GetStream/stream-build-conventions-android/.github/workflows/pr-clean-stale.yaml@v0.14.1 + uses: GetStream/stream-build-conventions-android/.github/workflows/pr-clean-stale.yaml@v1.0.0 secrets: inherit diff --git a/.github/workflows/pr-quality.yml b/.github/workflows/pr-quality.yml index 9f804fc5c..6a8af5e1b 100644 --- a/.github/workflows/pr-quality.yml +++ b/.github/workflows/pr-quality.yml @@ -14,5 +14,5 @@ concurrency: jobs: pr-checklist: - uses: GetStream/stream-build-conventions-android/.github/workflows/pr-quality.yml@v0.14.1 + uses: GetStream/stream-build-conventions-android/.github/workflows/pr-quality.yml@v1.0.0 secrets: inherit diff --git a/.github/workflows/publish-new-version.yml b/.github/workflows/publish-new-version.yml index 262d55a54..aaa384531 100644 --- a/.github/workflows/publish-new-version.yml +++ b/.github/workflows/publish-new-version.yml @@ -12,6 +12,22 @@ on: - minor - major default: minor + suffix: + description: 'Optional version suffix (e.g. beta, rc01). A dash is added automatically.' + required: false + type: string + default: '' + publish-targets: + description: >- + Leave as-is. central is a manual escape hatch for a release that has to + go out when the Stream repository cannot take it. + required: false + type: choice + options: + - streamRepo + - streamRepo,central + - central + default: streamRepo concurrency: group: release @@ -32,9 +48,11 @@ jobs: permissions: contents: write needs: pre_release_check - uses: GetStream/stream-build-conventions-android/.github/workflows/release.yml@9ea4d20d64f99a1a05dd8c8f56504e5e2aa39ed7 + uses: GetStream/stream-build-conventions-android/.github/workflows/release.yml@161dace284ff29473ea607bf26f436f6bb46c057 with: bump: ${{ inputs.bump }} + suffix: ${{ inputs.suffix }} + publish-targets: ${{ inputs.publish-targets }} secrets: github-token: ${{ secrets.STREAM_PUBLIC_BOT_TOKEN }} maven-central-username: ${{ secrets.OSSRH_USERNAME }} @@ -43,3 +61,47 @@ jobs: signing-key-id: ${{ secrets.SIGNING_KEY_ID }} signing-key-password: ${{ secrets.SIGNING_PASSWORD }} slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_ANDROID_CICD }} + stream-repo-endpoint: ${{ secrets.STREAM_REPO_ENDPOINT }} + stream-repo-bucket: ${{ secrets.STREAM_REPO_BUCKET }} + stream-repo-access-key-id: ${{ secrets.STREAM_REPO_ACCESS_KEY_ID }} + stream-repo-secret-access-key: ${{ secrets.STREAM_REPO_SECRET_ACCESS_KEY }} + + # Customers need one line of setup to see a version that is not on Central, + # so say so at the top of the release, above the generated "What's Changed". + # A separate job because the release is created inside the reusable workflow. + release-notes-header: + needs: publish + if: ${{ inputs.publish-targets == 'streamRepo' }} + name: Add the Stream repository card to the release + runs-on: ubuntu-24.04 + permissions: + contents: write + steps: + - name: Prepend the card + env: + GH_TOKEN: ${{ github.token }} + run: | + set -euo pipefail + # The release concurrency group means the newest release is this run's. + TAG=$(gh release list -R "$GITHUB_REPOSITORY" --limit 1 --json tagName -q '.[0].tagName') + + cat > card.md < [!IMPORTANT] + > **\`$TAG\` is published to the Stream Maven repository, not Maven Central.** + > + > \`\`\`kotlin + > // settings.gradle.kts + > dependencyResolutionManagement { + > repositories { + > google() + > mavenCentral() + > maven("https://stream-io-repo.com") + > } + > } + > \`\`\` + + EOF + + gh release view "$TAG" -R "$GITHUB_REPOSITORY" --json body -q .body > notes.md + cat card.md notes.md > body.md + gh release edit "$TAG" -R "$GITHUB_REPOSITORY" --notes-file body.md diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml index 1956f0c22..033335ba2 100644 --- a/.github/workflows/publish-snapshot.yml +++ b/.github/workflows/publish-snapshot.yml @@ -12,10 +12,11 @@ jobs: release: permissions: contents: write - uses: GetStream/stream-build-conventions-android/.github/workflows/release.yml@v0.14.1 + uses: GetStream/stream-build-conventions-android/.github/workflows/release.yml@v1.0.0 with: bump: patch snapshot: true + publish-targets: streamRepo secrets: github-token: ${{ secrets.STREAM_PUBLIC_BOT_TOKEN }} maven-central-username: ${{ secrets.OSSRH_USERNAME }} @@ -24,3 +25,7 @@ jobs: signing-key-id: ${{ secrets.SIGNING_KEY_ID }} signing-key-password: ${{ secrets.SIGNING_PASSWORD }} slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_ANDROID_CICD }} + stream-repo-endpoint: ${{ secrets.STREAM_REPO_ENDPOINT }} + stream-repo-bucket: ${{ secrets.STREAM_REPO_BUCKET }} + stream-repo-access-key-id: ${{ secrets.STREAM_REPO_ACCESS_KEY_ID }} + stream-repo-secret-access-key: ${{ secrets.STREAM_REPO_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/sdk-size-checks.yml b/.github/workflows/sdk-size-checks.yml index c6d76ebb5..d92b10af1 100644 --- a/.github/workflows/sdk-size-checks.yml +++ b/.github/workflows/sdk-size-checks.yml @@ -13,7 +13,7 @@ concurrency: jobs: compare-sdk-sizes: - uses: GetStream/stream-build-conventions-android/.github/workflows/sdk-size-checks.yml@v0.14.1 + uses: GetStream/stream-build-conventions-android/.github/workflows/sdk-size-checks.yml@v1.0.0 with: modules: "stream-feeds-android-client" metrics-project: "stream-feeds-android-metrics" diff --git a/.github/workflows/sdk-size-updates.yml b/.github/workflows/sdk-size-updates.yml index bef9d6b81..3d332c699 100644 --- a/.github/workflows/sdk-size-updates.yml +++ b/.github/workflows/sdk-size-updates.yml @@ -15,7 +15,7 @@ jobs: update-sdk-sizes: permissions: contents: read - uses: GetStream/stream-build-conventions-android/.github/workflows/sdk-size-updates.yml@9ea4d20d64f99a1a05dd8c8f56504e5e2aa39ed7 + uses: GetStream/stream-build-conventions-android/.github/workflows/sdk-size-updates.yml@161dace284ff29473ea607bf26f436f6bb46c057 with: modules: "stream-feeds-android-client" metrics-project: "stream-feeds-android-metrics" diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d00ac6090..33b26b01f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -34,7 +34,7 @@ streamAndroidCore = "5.1.1" symbolProcessingApi = "2.2.0-2.0.2" lifecycleProcess = "2.9.1" lifecycleViewModelCompose = "2.4.0" -streamConventions = "0.14.1" +streamConventions = "1.0.0" turbine = "1.2.1" [libraries] diff --git a/settings.gradle.kts b/settings.gradle.kts index 1c313ccd0..2aa8325bb 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -10,6 +10,7 @@ pluginManagement { mavenCentral() gradlePluginPortal() mavenLocal() + maven("https://stream-io-repo.com") } }