Pre-release updates #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pre-release updates | |
on: | |
workflow_dispatch: | |
inputs: | |
sdkTypescriptVersion: | |
description: 'sdk-typescript version (without prepending v). Leave empty if you do not want to update it.' | |
required: false | |
type: string | |
sdkJavaVersion: | |
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: | |
# prevent from running on forks | |
if: github.repository_owner == 'restatedev' | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Bump Typescript SDK | |
- uses: actions/setup-node@v3 | |
if: github.event.inputs.sdkTypescriptVersion != '' | |
with: | |
node-version: "19.x" | |
registry-url: 'https://registry.npmjs.org' | |
- name: Bump sdk-typescript | |
if: github.event.inputs.sdkTypescriptVersion != '' | |
run: ./.tools/update_node_examples.sh ${{ inputs.sdkTypescriptVersion }} | |
- name: Bump cdk | |
if: github.event.inputs.cdkVersion != '' | |
run: ./.tools/update_cdk_examples.sh ${{ inputs.cdkVersion }} | |
- name: Run Node tests | |
if: github.event.inputs.sdkTypescriptVersion != '' | |
run: ./.tools/run_node_tests.sh | |
# Bump Java SDK | |
- uses: actions/setup-java@v3 | |
if: github.event.inputs.sdkJavaVersion != '' | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Setup Gradle | |
if: github.event.inputs.sdkJavaVersion != '' | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Bump sdk-java | |
if: github.event.inputs.sdkJavaVersion != '' | |
run: ./.tools/update_jvm_examples.sh ${{ inputs.sdkJavaVersion }} | |
- name: Run JVM tests | |
if: github.event.inputs.sdkJavaVersion != '' | |
run: ./.tools/run_jvm_tests.sh | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
title: "[GithubActions] Update Restate ${{ inputs.sdkTypescriptVersion != '' && format('SDK-Typescript {0} ', inputs.sdkTypescriptVersion) }}${{ inputs.sdkJavaVersion != '' && format('SDK-Java {0} ', inputs.sdkJavaVersion) }}${{ inputs.cdkVersion != '' && format('CDK {0} ', inputs.cdkVersion) }}" | |
commit-message: "[GithubActions] Update Restate ${{ inputs.sdkTypescriptVersion != '' && format('SDK-Typescript {0} ', inputs.sdkTypescriptVersion) }}${{ inputs.sdkJavaVersion != '' && format('SDK-Java {0} ', inputs.sdkJavaVersion) }}${{ inputs.cdkVersion != '' && format('CDK {0} ', inputs.cdkVersion) }}" | |
add-paths: | | |
**/package.json | |
**/package-lock.json | |
**/build.gradle.kts | |
**/pom.xml |