-
Notifications
You must be signed in to change notification settings - Fork 32
214 lines (206 loc) · 7.98 KB
/
Copy pathpre-release.yml
File metadata and controls
214 lines (206 loc) · 7.98 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
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