-
Notifications
You must be signed in to change notification settings - Fork 9
68 lines (62 loc) · 2.66 KB
/
pre-release.yml
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
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