-
Notifications
You must be signed in to change notification settings - Fork 3k
65 lines (55 loc) · 2.07 KB
/
generate-v3.yml
File metadata and controls
65 lines (55 loc) · 2.07 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
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Generate V3 Samples
on:
workflow_dispatch:
repository_dispatch:
types: [ generate-v3 ]
jobs:
generate-v3:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
- name: Install NDK
run: |
sudo ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install "ndk;20.0.5594570"
- name: Generate V3
id: gradlew-generate-v3
run: |
./gradlew :ApiDemos:java-app:generateV3 :ApiDemos:java-app:generateV3Layout
./gradlew :ApiDemos:kotlin-app:generateV3 :ApiDemos:kotlin-app:generateV3Layout
echo "files-changed=$(git status -s | wc -l)" >> $GITHUB_OUTPUT
- name: PR Changes
uses: peter-evans/create-pull-request@v6
if: steps.gradlew-generate-v3.outputs.files-changed > 0
with:
token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
commit-message: 'chore: Generate V3 samples'
committer: googlemaps-bot <googlemaps-bot@google.com>
author: googlemaps-bot <googlemaps-bot@google.com>
title: 'chore: Generate V3 samples'
body: |
Generating V3 code via `./gradlew generateV3 generateV3Layout`
branch: googlemaps-bot/generate-v3
- name: Uninstall NDK
run: |
${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --uninstall 'ndk;20.0.5594570'