File tree 1 file changed +55
-0
lines changed
1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This workflow updates the `next` branch with freshly generated
2
+ # code from the latest smithy-rs and models that reside in aws-sdk-rust.
3
+ name : Update `aws-sdk-rust/next`
4
+ on :
5
+ workflow_dispatch :
6
+
7
+ jobs :
8
+ update-next :
9
+ name : Update `next`
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Check out `smithy-rs`
13
+ uses : actions/checkout@v3
14
+ with :
15
+ repository : awslabs/smithy-rs
16
+ ref : main
17
+ path : smithy-rs
18
+ - name : Check out `aws-sdk-rust`
19
+ uses : actions/checkout@v3
20
+ with :
21
+ repository : awslabs/aws-sdk-rust
22
+ ref : main
23
+ path : aws-sdk-rust
24
+ token : ${{ secrets.RELEASE_AUTOMATION_BOT_PAT }}
25
+ - name : Set up JDK
26
+ uses : actions/setup-java@v1
27
+ with :
28
+ java-version : 11
29
+ # Rust is only used to `rustfmt` the generated code; doesn't need to match MSRV
30
+ - name : Set up Rust
31
+ uses : actions-rs/toolchain@v1
32
+ with :
33
+ toolchain : stable
34
+ - name : Delete old SDK
35
+ run : |
36
+ - name : Generate a fresh SDK
37
+ run : |
38
+ WORKSPACE="$(pwd)"
39
+ cd smithy-rs
40
+ ./gradlew aws:sdk:assemble --info -Paws.sdk.models.path="${WORKSPACE}/aws-sdk-rust/aws-models"
41
+ - name : Update `aws-sdk-rust/next`
42
+ run : |
43
+ set -eux
44
+ cd aws-sdk-rust
45
+ git checkout origin/main -b next
46
+
47
+ # Delete the old SDK
48
+ rm -rf sdk examples
49
+ rm -f versions.toml Cargo.toml index.md
50
+
51
+ # Copy in the new SDK
52
+ mv ../smithy-rs/aws/sdk/build/aws-sdk/* .
53
+ git add .
54
+ git -c 'user.name=AWS SDK Rust Bot' -c '[email protected] ' commit -m 'Update `aws-sdk-rust/next`' --allow-empty
55
+ git push origin next:next --force
You can’t perform that action at this time.
0 commit comments