docs: Add more example api calls #78
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: Java CI with Gradle | |
on: | |
merge_group: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Test and Build OpenFGA | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java: [ '11', '17', '20' ] | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.2 | |
- name: Set up JDK | |
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3.12.0 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'temurin' | |
cache: gradle | |
# By Gradle conventions, "build" requires "check" to pass. "check" is an umbrella task that | |
# runs tests and lints. See the project's build.gradle for configurations. | |
- name: Test and Build with Gradle | |
run: | | |
./gradlew build | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: [test] | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.2 | |
- name: Set up JDK | |
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3.12.0 | |
with: | |
java-version: 11 | |
distribution: 'temurin' | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4 # v1.1.0 | |
- name: Publish package | |
uses: gradle/gradle-build-action@ef76a971e2fa3f867b617efd72f2fbd72cf6f8bc # v2.8.0 | |
with: | |
arguments: publish | |
env: | |
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ORG_GRADLE_PROJECT_SIGNINGKEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }} | |
ORG_GRADLE_PROJECT_SIGNINGPASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }} | |
create-release: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: publish | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: Roang-zero1/github-create-release-action@5cf058ddffa6fa04e5cda07c98570c757dc4a0e1 | |
with: | |
version_regex: ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+ | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |