Skip to content

release: 0.2.0

release: 0.2.0 #12

Workflow file for this run

name: JVM SDK CI
on:
push:
pull_request:
# Least privilege for a verification-only workflow: every job below only reads the checked-out
# tree, so the run's GITHUB_TOKEN is narrowed to that regardless of the repository's default
# grants. Declared at the workflow level so a job added later inherits the floor.
permissions:
contents: read
jobs:
# Verification only, never auto-fix: the SDK is generated formatter-clean, so a reported file
# means either hand-edited custom code or a regenerate that was not committed. Both tools are
# pinned to the release that produced these bytes, since a formatter minor can change them, and
# both run from their published jars so this job needs no Gradle plugin in the generated build.
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
with:
distribution: temurin
java-version: "21"
- name: ktfmt
run: |
curl -fsSL -o /tmp/ktfmt.jar \
"https://repo1.maven.org/maven2/com/facebook/ktfmt/0.64/ktfmt-0.64-with-dependencies.jar"
find . -type f \( -name '*.kt' -o -name '*.kts' \) -print0 \
| xargs -0 -r java -jar /tmp/ktfmt.jar --kotlinlang-style --dry-run --set-exit-if-changed
# No style flag: the generator formats with google-java-format's own Google style, which is
# what the tool does when none is passed. `-r` because a Kotlin-target SDK has no `.java`
# files at all, and the formatter exits non-zero when handed no arguments.
- name: google-java-format
run: |
curl -fsSL -o /tmp/google-java-format.jar \
"https://repo1.maven.org/maven2/com/google/googlejavaformat/google-java-format/1.36.1/google-java-format-1.36.1-all-deps.jar"
find . -type f -name '*.java' -print0 \
| xargs -0 -r java -jar /tmp/google-java-format.jar --dry-run --set-exit-if-changed
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
with:
distribution: temurin
java-version: "21"
# `enhanced` (the default) is proprietary — free for public repos, a free preview for
# private. `basic` is MIT `actions/cache` but keeps no restore keys: a dependency change
# rebuilds the cache cold.
- uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0
with:
cache-provider: basic
- run: ./gradlew build