Update text_generation.kt #465
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check for api changes | |
on: pull_request | |
jobs: | |
check-for-api-changes: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout master | |
uses: actions/checkout@v3.5.3 | |
with: | |
ref: ${{ github.base_ref }} | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: temurin | |
cache: gradle | |
- name: Generate the api file | |
run: | | |
./gradlew exportApi --no-daemon | |
- name: Save public.api from master | |
run: | | |
mkdir ~/common/ && \ | |
mkdir ~/generativeai/ && \ | |
mv generativeai/public.api ~/generativeai/public.api && \ | |
mv common/public.api ~/common/public.api | |
- name: Checkout branch | |
uses: actions/checkout@v3.5.3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: temurin | |
cache: gradle | |
- name: Copy saved api to branch | |
run: | | |
mv ~/generativeai/public.api generativeai/public.api && \ | |
mv ~/common/public.api common/public.api | |
- name: Run api warning task | |
run: | | |
./gradlew warnAboutApiChanges --no-daemon | |
- name: Add PR Comment | |
if: ${{ hashFiles('api_changes.md') != '' }} | |
uses: marocchino/sticky-pull-request-comment@v2.8.0 | |
with: | |
header: api_changes | |
path: build/api_changes.md | |
- name: Remove old PR Comment | |
if: ${{ hashFiles('api_changes.md') == '' }} | |
uses: marocchino/sticky-pull-request-comment@v2.8.0 | |
with: | |
header: api_changes | |
delete: true |