Skip to content

Pre-release updates #11

Pre-release updates

Pre-release updates #11

Workflow file for this run

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
- 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
- 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