Skip to content

Embed the selector engine in the standalone report viewer (#243) #144

Embed the selector engine in the standalone report viewer (#243)

Embed the selector engine in the standalone report viewer (#243) #144

name: Snapshot Release
on:
# Runs after merging to the default branch
push:
branches: [ "main" ]
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"
jobs:
publish:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Setup Bun
# `-Ptrailblaze.wasm=true` packages `:trailblaze-models`' JAR resources,
# which runs `:trailblaze-models:bundleTrailblazeSdkDts` to roll up the
# `@trailblaze/scripting` declaration bundle. That task `bun install`s the
# SDK devDependencies and shells out to esbuild/dts-bundle-generator, so
# bun is a hard build prerequisite — without it on PATH the build fails.
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
- name: Generate WASM Report Template
run: ./gradlew :trailblaze-report:generateReportTemplate -Ptrailblaze.wasm=true
- name: Publish Artifacts
# No `-Pversion` here — snapshots publish at the `gradle.properties` SNAPSHOT version, which
# goes straight to the snapshot repository. Only a `v*` tag (see release.yml) produces a
# Maven Central release.
run: ./gradlew publishAllPublicationsToMavenCentralRepository -Ptrailblaze.wasm=true
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_SECRET_PASSPHRASE }}