Skip to content

Commit 636749f

Browse files
committed
Integrate CDK version upgrade into pre-release workflow
1 parent dc7de70 commit 636749f

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/pre-release.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
description: 'sdk-java version (without prepending v). Leave empty if you do not want to update it.'
1212
required: false
1313
type: string
14+
cdkVersion:
15+
description: 'cdk version (without prepending v). Leave empty if you do not want to update it.'
16+
required: false
17+
type: string
1418

1519
jobs:
1620
updates:
@@ -53,6 +57,9 @@ jobs:
5357
- name: Find and replace restateVersion in build.gradle.kts for kotlin templates
5458
if: github.event.inputs.sdkJavaVersion != ''
5559
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
60+
- name: Find and replace restateVersion in build.gradle.kts for kotlin/hello-world-lambda-cdk
61+
if: github.event.inputs.sdkJavaVersion != ''
62+
run: sed -i 's/val restateVersion = "[0-9A-Z.-]*"/val restateVersion = "${{ inputs.sdkJavaVersion }}"/' kotlin/hello-world-lambda-cdk/lambda/build.gradle.kts
5663

5764
# When adding a new example add the check task here
5865
- name: Test java/hello-world-http
@@ -80,11 +87,15 @@ jobs:
8087
arguments: check
8188
build-root-directory: kotlin/hello-world-lambda
8289

90+
- name: Update cdk version
91+
if: github.event.inputs.cdkVersion != ''
92+
run: npm --prefix kotlin/hello-world-lambda-cdk install @restatedev/restate-cdk@^${{ inputs.cdkVersion }}
93+
8394
# CDK projects are a hybrid of TypeScript CDK stack + platform-specific handler code; the top-level npm CDK build
84-
# is responsible for verifying the language-specific handler cod. They are also not a part of the TypeScript
95+
# is responsible for verifying the language-specific handler code. They are also not a part of the TypeScript
8596
# examples workspace, so we test them separately here.
8697
- name: Test kotlin/hello-world-lambda-cdk
87-
if: github.event.inputs.sdkTypescriptVersion != '' && github.event.inputs.sdkJavaVersion != ''
98+
if: github.event.inputs.cdkVersion != '' || github.event.inputs.sdkJavaVersion != ''
8899
run: |
89100
npm --prefix kotlin/hello-world-lambda-cdk install
90101
npm --prefix kotlin/hello-world-lambda-cdk run verify

0 commit comments

Comments
 (0)