forked from smithy-lang/smithy-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (54 loc) · 1.72 KB
/
update-sdk-next.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
# This workflow updates the `next` branch with freshly generated
# code from the latest smithy-rs and models that reside in aws-sdk-rust.
name: Update `aws-sdk-rust/next`
on:
workflow_dispatch:
jobs:
update-next:
name: Update `next`
runs-on: ubuntu-latest
steps:
- name: Check out `smithy-rs`
uses: actions/checkout@v3
with:
repository: awslabs/smithy-rs
ref: main
path: smithy-rs
- name: Check out `aws-sdk-rust`
uses: actions/checkout@v3
with:
repository: awslabs/aws-sdk-rust
ref: main
path: aws-sdk-rust
token: ${{ secrets.RELEASE_AUTOMATION_BOT_PAT }}
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: corretto
java-package: jdk
java-version: 11
# Rust is only used to `rustfmt` the generated code; doesn't need to match MSRV
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.67.1
- name: Delete old SDK
run: |
- name: Generate a fresh SDK
run: |
WORKSPACE="$(pwd)"
cd smithy-rs
./gradlew aws:sdk:assemble --info -Paws.sdk.models.path="${WORKSPACE}/aws-sdk-rust/aws-models"
- name: Update `aws-sdk-rust/next`
run: |
set -eux
cd aws-sdk-rust
git checkout origin/main -b next
# Delete the old SDK
rm -rf sdk examples
rm -f versions.toml Cargo.toml index.md
# Copy in the new SDK
mv ../smithy-rs/aws/sdk/build/aws-sdk/* .
git add .
git -c 'user.name=AWS SDK Rust Bot' -c '[email protected]' commit -m 'Update `aws-sdk-rust/next`' --allow-empty
git push origin next:next --force