Release common 0.10.0 #463
Workflow file for this run
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/[email protected] | |
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/[email protected] | |
- 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/[email protected] | |
with: | |
header: api_changes | |
path: build/api_changes.md | |
- name: Remove old PR Comment | |
if: ${{ hashFiles('api_changes.md') == '' }} | |
uses: marocchino/[email protected] | |
with: | |
header: api_changes | |
delete: true |