-
Notifications
You must be signed in to change notification settings - Fork 30
136 lines (127 loc) · 5.7 KB
/
pre-release.yml
File metadata and controls
136 lines (127 loc) · 5.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
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
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
jobs:
updates:
# prevent from running on forks
if: github.repository_owner == 'restatedev'
runs-on: ubuntu-latest
timeout-minutes: 40
env:
RESTATE_DISABLE_TELEMETRY: "true"
steps:
- name: Checkout
uses: actions/checkout@v3
# Bump Typescript SDK
- uses: actions/setup-node@v3
if: github.event.inputs.sdkTypescriptVersion != ''
with:
node-version: "20.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: "21"
- 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/setup-python@v5
if: github.event.inputs.sdkPythonVersion != ''
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v6
- 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
# Bump Rust SDK
- name: Install Rust toolchain
if: github.event.inputs.sdkRustVersion != ''
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy
rustflags: ""
- name: Install cargo-edit
if: github.event.inputs.sdkRustVersion != ''
run: cargo install -f --no-default-features --features upgrade cargo-edit@0.13.2
- name: Bump sdk-rust
if: github.event.inputs.sdkRustVersion != ''
run: ./.tools/update_rust_examples.sh ${{ inputs.sdkRustVersion }}
- name: Run Rust tests
if: github.event.inputs.sdkRustVersion != ''
run: ./.tools/run_rust_tests.sh
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
title: "[GithubActions] Update ${{ 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) }} ${{ inputs.sdkRustVersion != '' && format('SDK-Rust {0} ', inputs.sdkRustVersion) }} ${{ inputs.sdkPythonVersion != '' && format('SDK-Python {0} ', inputs.sdkPythonVersion) }}"
commit-message: "[GithubActions] Update ${{ 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) }} ${{ inputs.sdkRustVersion != '' && format('SDK-Rust {0} ', inputs.sdkRustVersion) }} ${{ inputs.sdkPythonVersion != '' && format('SDK-Python {0} ', inputs.sdkPythonVersion) }}"
add-paths: |
**/package.json
**/package-lock.json
**/build.gradle.kts
**/pom.xml
**/pyproject.toml
**/requirements.txt
**/go.mod
**/go.sum
**/Cargo.lock
**/Cargo.toml
**/AGENTS.md
**/CLAUDE.md