Pre-release updates #69
This file contains hidden or 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. Bumps both the Java and Kotlin examples." | |
| required: false | |
| type: string | |
| sdkGoVersion: | |
| description: "sdk-go version (without 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 | |
| sdkRustVersion: | |
| description: "sdk-rust 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 | |
| # Each SDK gets its own job so the bumps + test suites run in parallel. A job only | |
| # runs when its version input is set, and each opens its own pull request on a | |
| # dedicated branch (one PR per SDK). | |
| env: | |
| RESTATE_DISABLE_TELEMETRY: "true" | |
| jobs: | |
| typescript: | |
| if: github.repository_owner == 'restatedev' && inputs.sdkTypescriptVersion != '' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 40 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.x" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Bump sdk-typescript | |
| run: ./.tools/update_node_examples.sh ${{ inputs.sdkTypescriptVersion }} | |
| - name: Run Node tests | |
| run: ./.tools/run_node_tests.sh | |
| - name: Compute paths to commit | |
| id: changes | |
| run: | | |
| { | |
| echo 'paths<<EOF' | |
| printf '%s\n' '**/package.json' 'typescript/templates/deno/main.ts' | |
| # Agent docs are only listed when they actually exist, otherwise git add | |
| # would fatal on a pathspec matching nothing. git ls-files just prints | |
| # nothing (exit 0) when there is no match. | |
| git ls-files -- ':(glob)**/AGENTS.md' ':(glob)**/CLAUDE.md' | |
| echo 'EOF' | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| title: "[GithubActions] Update SDK-Typescript ${{ inputs.sdkTypescriptVersion }}" | |
| commit-message: "[GithubActions] Update SDK-Typescript ${{ inputs.sdkTypescriptVersion }}" | |
| branch: pre-release/typescript | |
| add-paths: ${{ steps.changes.outputs.paths }} | |
| cdk: | |
| if: github.repository_owner == 'restatedev' && inputs.cdkVersion != '' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.x" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Bump cdk | |
| run: ./.tools/update_cdk_examples.sh ${{ inputs.cdkVersion }} | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| title: "[GithubActions] Update CDK ${{ inputs.cdkVersion }}" | |
| commit-message: "[GithubActions] Update CDK ${{ inputs.cdkVersion }}" | |
| branch: pre-release/cdk | |
| # The CDK bump touches package.json in the Go/Kotlin/TypeScript/Python lambda-cdk integrations. | |
| add-paths: | | |
| **/package.json | |
| java: | |
| if: github.repository_owner == 'restatedev' && inputs.sdkJavaVersion != '' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 40 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: "temurin" | |
| java-version: "25" | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Bump sdk-java | |
| run: ./.tools/update_jvm_examples.sh ${{ inputs.sdkJavaVersion }} | |
| - name: Run JVM tests | |
| run: ./.tools/run_jvm_tests.sh | |
| - name: Compute paths to commit | |
| id: changes | |
| run: | | |
| { | |
| echo 'paths<<EOF' | |
| printf '%s\n' '**/build.gradle.kts' '**/pom.xml' | |
| git ls-files -- ':(glob)**/AGENTS.md' ':(glob)**/CLAUDE.md' | |
| echo 'EOF' | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| title: "[GithubActions] Update SDK-Java ${{ inputs.sdkJavaVersion }}" | |
| commit-message: "[GithubActions] Update SDK-Java ${{ inputs.sdkJavaVersion }}" | |
| branch: pre-release/java | |
| add-paths: ${{ steps.changes.outputs.paths }} | |
| python: | |
| if: github.repository_owner == 'restatedev' && inputs.sdkPythonVersion != '' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 40 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Bump Python SDK | |
| run: ./.tools/update_python_examples.sh ${{ inputs.sdkPythonVersion }} | |
| - name: Run Python tests | |
| run: ./.tools/run_python_tests.sh | |
| - name: Compute paths to commit | |
| id: changes | |
| run: | | |
| { | |
| echo 'paths<<EOF' | |
| printf '%s\n' '**/pyproject.toml' '**/requirements.txt' | |
| git ls-files -- ':(glob)**/AGENTS.md' ':(glob)**/CLAUDE.md' | |
| echo 'EOF' | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| title: "[GithubActions] Update SDK-Python ${{ inputs.sdkPythonVersion }}" | |
| commit-message: "[GithubActions] Update SDK-Python ${{ inputs.sdkPythonVersion }}" | |
| branch: pre-release/python | |
| add-paths: ${{ steps.changes.outputs.paths }} | |
| go: | |
| if: github.repository_owner == 'restatedev' && inputs.sdkGoVersion != '' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 40 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.22" | |
| - name: Bump sdk-go | |
| run: ./.tools/update_go_examples.sh ${{ inputs.sdkGoVersion }} | |
| - name: Run Go tests | |
| run: ./.tools/run_go_tests.sh | |
| - name: Compute paths to commit | |
| id: changes | |
| run: | | |
| { | |
| echo 'paths<<EOF' | |
| printf '%s\n' '**/go.mod' '**/go.sum' | |
| git ls-files -- ':(glob)**/AGENTS.md' ':(glob)**/CLAUDE.md' | |
| echo 'EOF' | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| title: "[GithubActions] Update SDK-Go ${{ inputs.sdkGoVersion }}" | |
| commit-message: "[GithubActions] Update SDK-Go ${{ inputs.sdkGoVersion }}" | |
| branch: pre-release/go | |
| add-paths: ${{ steps.changes.outputs.paths }} | |
| rust: | |
| if: github.repository_owner == 'restatedev' && inputs.sdkRustVersion != '' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 40 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| components: clippy | |
| rustflags: "" | |
| - name: Install cargo-edit | |
| run: cargo install -f --no-default-features --features upgrade cargo-edit@0.13.2 | |
| - name: Bump sdk-rust | |
| run: ./.tools/update_rust_examples.sh ${{ inputs.sdkRustVersion }} | |
| - name: Run Rust tests | |
| run: ./.tools/run_rust_tests.sh | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| title: "[GithubActions] Update SDK-Rust ${{ inputs.sdkRustVersion }}" | |
| commit-message: "[GithubActions] Update SDK-Rust ${{ inputs.sdkRustVersion }}" | |
| branch: pre-release/rust | |
| add-paths: | | |
| **/Cargo.toml | |
| **/Cargo.lock |