Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/release-readiness.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release readiness (snapshot dependency)

# Makes sure that we aren't relying on SNAPSHOT/dev versions of smithy-kotlin before merging
# Otherwise we could forget because the rest of CI is masking it

on:
pull_request:
branches: [ main ]

jobs:
release-readiness:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Configure Gradle
uses: awslabs/aws-kotlin-repo-tools/.github/actions/configure-gradle@main

- name: Configure error message
run: echo "ERROR_MESSAGE=WARNING smithy-kotlin release and version bump might be required before merging" >> $GITHUB_ENV

- name: Build SDK
run: ./gradlew test jvmTest || { echo "$ERROR_MESSAGE"; exit 1; }

- name: Build SDK client
run: |
./gradlew -Paws.services=s3 -Paws.kotlin.native=false bootstrap || { echo "$ERROR_MESSAGE"; exit 1; }
./gradlew -Paws.kotlin.native=false build || { echo "$ERROR_MESSAGE"; exit 1; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I think this is still more complicated than it needs to be. A step can be configured to run on failure so that a GitHub-standard error message can be emitted:

jobs:
  release-readiness:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@v4

      - name: Configure Gradle
        uses: awslabs/aws-kotlin-repo-tools/.github/actions/configure-gradle@main

      - name: Build SDK
        run: ./gradlew test jvmTest

      - name: Build SDK client
        run: |
          ./gradlew -Paws.services=s3 -Paws.kotlin.native=false bootstrap
          ./gradlew -Paws.kotlin.native=false build

      - name: Emit error message
        if: ${{ failure() }}
        run: |
          echo "::error ::Build failed. Did you forget to release smithy-kotlin and bump the dependency version?"
          exit 1

4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ atomicfu-version = "0.25.0"
binary-compatibility-validator-version = "0.16.3"

# smithy-kotlin codegen and runtime are versioned separately
smithy-kotlin-runtime-version = "1.4.11"
smithy-kotlin-codegen-version = "0.34.11"
smithy-kotlin-runtime-version = "1.4.12"
smithy-kotlin-codegen-version = "0.34.12"

# codegen
smithy-version = "1.53.0"
Expand Down
Loading