Skip to content

Commit

Permalink
Fix build workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
vyfor committed Apr 6, 2024
1 parent afef424 commit 303385b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 12 deletions.
39 changes: 29 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,17 @@ jobs:
name: Build

strategy:
fail-fast: false
fail-fast: true
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
include:
- target: windows
os: windows-latest
- target: linux
os: ubuntu-latest
- target: macos
os: macos-latest
- target: jvm
os: ubuntu-latest

runs-on: ${{ matrix.os }}
steps:
Expand All @@ -29,11 +37,22 @@ jobs:
distribution: 'zulu'
java-version: '16'

- name: Build Project
run: ./gradlew build -x test

env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
- uses: gradle/actions/setup-gradle@v3

- name: Publish to Maven Central
run: |
if [ ${{ matrix.target }} == jvm ]; then
./gradlew compileKotlinJvm
else
case ${{ matrix.os }} in
windows-latest)
./gradlew compileKotlinMingwX64
;;
ubuntu-latest)
./gradlew compileKotlinLinuxX64
;;
macos-latest)
./gradlew compileKotlinMacosX64
;;
esac
fi
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
./gradlew publishMingwPublicationToMavenCentral
;;
ubuntu-latest)
./gradlew publishLinuxX64PublicationToMavenCentral publishLinuxArm64PublicationToMavenCentral publishJvmPublicationToMavenCentral
./gradlew publishLinuxX64PublicationToMavenCentral publishLinuxArm64PublicationToMavenCentral
;;
macos-latest)
./gradlew publishMacosX64PublicationToMavenCentral publishMacosArm64PublicationToMavenCentral
Expand All @@ -64,4 +64,4 @@ jobs:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}

0 comments on commit 303385b

Please sign in to comment.