Skip to content

Commit 147cd68

Browse files
committed
Merge branch 'main' of github.com:awslabs/aws-crt-kotlin into kn-main
2 parents d254084 + 37eff7a commit 147cd68

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Kat Transform
2+
3+
on:
4+
pull_request:
5+
types: [ opened, synchronize, reopened, labeled, unlabeled ]
6+
branches: [ main ]
7+
8+
# Allow one instance of this workflow per pull request, and cancel older runs when new changes are pushed
9+
concurrency:
10+
group: kat-pr-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
id-token: write
15+
contents: read
16+
17+
env:
18+
RUN: ${{ github.run_id }}-${{ github.run_number }}
19+
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dkotlin.incremental=false"
20+
21+
jobs:
22+
verify-transform:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout sources
26+
uses: actions/checkout@v4
27+
with:
28+
path: 'aws-crt-kotlin'
29+
30+
- name: Configure AWS Credentials
31+
uses: aws-actions/configure-aws-credentials@v4
32+
with:
33+
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
34+
aws-region: us-west-2
35+
36+
- name: Setup kat
37+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/setup-kat@main
38+
39+
- name: Configure JDK
40+
uses: actions/setup-java@v3
41+
with:
42+
distribution: 'corretto'
43+
java-version: 17
44+
cache: 'gradle'
45+
46+
- name: Build
47+
working-directory: ./aws-crt-kotlin
48+
shell: bash
49+
run: |
50+
pwd
51+
ls -lsa
52+
kat bump-version # Bump from `vNext-SNAPSHOT` to `vNext`. kat transform only works on non-SNAPSHOT versions
53+
./gradlew build
54+
./gradlew publishAllPublicationsToTestLocalRepository
55+
56+
- name: Transform
57+
working-directory: ./aws-crt-kotlin
58+
shell: bash
59+
run: |
60+
pwd
61+
ls -lsa
62+
kat brazil transform -i ./build/m2 -o ./transformed -t .brazil.json -v live
63+
64+
# Check for manifest file
65+
if [ ! -f "./transformed/brazil-import-manifest.json" ]; then
66+
echo "Error: brazil-import-manifest.json not found in the transformed artifact"
67+
exit 1
68+
fi
69+
70+
echo "Transformation succeeded!"

0 commit comments

Comments
 (0)