diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index a8b90935..211fac94 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -11,6 +11,10 @@ on: description: 'sdk-java version (without prepending v). Leave empty if you do not want to update it.' required: false type: string + cdkVersion: + description: 'cdk version (without prepending v). Leave empty if you do not want to update it.' + required: false + type: string jobs: updates: @@ -53,6 +57,9 @@ jobs: - name: Find and replace restateVersion in build.gradle.kts for kotlin templates if: github.event.inputs.sdkJavaVersion != '' run: for jvmDir in hello-world-http hello-world-lambda; do sed -i 's/val restateVersion = "[0-9A-Z.-]*"/val restateVersion = "${{ inputs.sdkJavaVersion }}"/' kotlin/$jvmDir/build.gradle.kts; done + - name: Find and replace restateVersion in build.gradle.kts for kotlin/hello-world-lambda-cdk + if: github.event.inputs.sdkJavaVersion != '' + run: sed -i 's/val restateVersion = "[0-9A-Z.-]*"/val restateVersion = "${{ inputs.sdkJavaVersion }}"/' kotlin/hello-world-lambda-cdk/lambda/build.gradle.kts # When adding a new example add the check task here - name: Test java/hello-world-http @@ -80,11 +87,15 @@ jobs: arguments: check build-root-directory: kotlin/hello-world-lambda + - name: Update cdk version + if: github.event.inputs.cdkVersion != '' + run: npm --prefix kotlin/hello-world-lambda-cdk install @restatedev/restate-cdk@^${{ inputs.cdkVersion }} + # CDK projects are a hybrid of TypeScript CDK stack + platform-specific handler code; the top-level npm CDK build - # is responsible for verifying the language-specific handler cod. They are also not a part of the TypeScript + # is responsible for verifying the language-specific handler code. They are also not a part of the TypeScript # examples workspace, so we test them separately here. - name: Test kotlin/hello-world-lambda-cdk - if: github.event.inputs.sdkTypescriptVersion != '' && github.event.inputs.sdkJavaVersion != '' + if: github.event.inputs.cdkVersion != '' || github.event.inputs.sdkJavaVersion != '' run: | npm --prefix kotlin/hello-world-lambda-cdk install npm --prefix kotlin/hello-world-lambda-cdk run verify