Skip to content

Commit

Permalink
Integrate CDK version upgrade into pre-release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tillrohrmann committed Jan 15, 2024
1 parent dc7de70 commit 636749f
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 636749f

Please sign in to comment.