Finalize eager options before any commands (#547) #47
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: Build | |
on: | |
pull_request: | |
paths-ignore: | |
- 'docs/**' | |
- 'samples/**' | |
- '*.md' | |
push: | |
branches: | |
- 'master' | |
paths-ignore: | |
- 'docs/**' | |
- 'samples/**' | |
- '*.md' | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ macos-latest, windows-latest, ubuntu-latest ] | |
include: | |
- os: macos-latest | |
TEST_TASK: macosArm64Test | |
- os: windows-latest | |
TEST_TASK: mingwX64Test | |
- os: ubuntu-latest | |
TEST_TASK: apiCheck check | |
runs-on: ${{matrix.os}} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- uses: gradle/actions/setup-gradle@v3 | |
with: | |
arguments: ${{matrix.TEST_TASK}} --stacktrace | |
- name: Upload the build report | |
if: failure() | |
uses: actions/upload-artifact@master | |
with: | |
name: build-report-${{ matrix.os }} | |
path: '**/build/reports' | |
publish: | |
needs: test | |
runs-on: macos-latest | |
if: ${{ github.ref == 'refs/heads/master' && github.repository == 'ajalt/clikt' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Deploy to sonatype | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
# disable configuration cache due to https://github.com/gradle/gradle/issues/22779 | |
arguments: publishToMavenCentral -PsnapshotVersion=true --no-configuration-cache | |
env: | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralPassword }} | |
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKey }} | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralUsername }} | |
env: | |
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=true -Dkotlin.incremental=false -Dorg.gradle.project.kotlin.incremental.multiplatform=false -Dorg.gradle.project.kotlin.native.disableCompilerDaemon=true -Dorg.gradle.jvmargs="-Xmx6g -Dfile.encoding=UTF-8" |