Skip to content

Pre-release updates #25

Pre-release updates

Pre-release updates #25

Workflow file for this run

name: Pre-release updates
on:
workflow_dispatch:
inputs:
restateVersion:
description: "Restate runtime version (without prepending v). Leave empty if you do not want to update it."
required: false
type: string
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
sdkGoVersion:
description: "sdk-go version (WITH the prepending v). Leave empty if you do not want to update it."
required: false
type: string
sdkPythonVersion:
description: 'sdk-python 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
- name: Bump Restate
if: github.event.inputs.restateVersion != ''
run: ./.tools/update_restate.sh ${{ inputs.restateVersion }}
# 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
# Bump Python SDK
- uses: actions/checkout@v3
if: github.event.inputs.sdkPythonVersion != ''
- uses: actions/setup-python@v5
if: github.event.inputs.sdkPythonVersion != ''
with:
python-version: "3.12"
- name: Bump Python SDK
if: github.event.inputs.sdkPythonVersion != ''
run: ./.tools/update_python_examples.sh ${{ inputs.sdkPythonVersion }}
- name: Run Python tests
if: github.event.inputs.sdkPythonVersion != ''
run: ./.tools/run_python_tests.sh
# Bump Go SDK
- uses: actions/setup-go@v5
if: github.event.inputs.sdkGoVersion != ''
with:
go-version: "1.22"
- name: Bump sdk-go
if: github.event.inputs.sdkGoVersion != ''
run: ./.tools/update_go_examples.sh ${{ inputs.sdkGoVersion }}
- name: Run Go tests
if: github.event.inputs.sdkGoVersion != ''
run: ./.tools/run_go_tests.sh
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
title: "[GithubActions] Update Restate ${{ inputs.restateVersion != '' && format('Runtime {0} ', inputs.restateVersion) }}${{ inputs.sdkTypescriptVersion != '' && format('SDK-Typescript {0} ', inputs.sdkTypescriptVersion) }}${{ inputs.sdkJavaVersion != '' && format('SDK-Java {0} ', inputs.sdkJavaVersion) }}${{ inputs.cdkVersion != '' && format('CDK {0} ', inputs.cdkVersion) }}${{ inputs.sdkGoVersion != '' && format('SDK-Go {0} ', inputs.sdkGoVersion) }}"
commit-message: "[GithubActions] Update Restate ${{ inputs.restateVersion != '' && format('Runtime {0} ', inputs.restateVersion) }}${{ 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
**/requirements.txt
**/go.mod
**/go.sum