Skip to content

Commit

Permalink
Minor changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
vyfor committed Apr 6, 2024
1 parent 7154398 commit aaa2623
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

- uses: gradle/actions/setup-gradle@v3

- name: Publish to Maven Central
- name: Build project
run: |
if [ ${{ matrix.target }} == jvm ]; then
./gradlew compileKotlinJvm
Expand Down
36 changes: 29 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ defaults:

jobs:
build:
name: Publish
name: Build and Publish
if: ${{ !contains(github.event.head_commit.message, '#skip') }}

strategy:
Expand All @@ -41,25 +41,47 @@ jobs:
distribution: 'zulu'
java-version: '16'

- uses: gradle/actions/setup-gradle@v3
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Publish to Maven Central
- name: Assemble project
run: |
if [ ${{ matrix.target }} == jvm ]; then
./gradlew publishJvmPublicationToMavenCentral
./gradlew jvmJar
else
case ${{ matrix.os }} in
windows-latest)
./gradlew publishMingwPublicationToMavenCentral
./gradlew compileKotlinMingwX64
;;
ubuntu-latest)
./gradlew publishLinuxX64PublicationToMavenCentral publishLinuxArm64PublicationToMavenCentral
./gradlew compileKotlinLinuxX64 compileKotlinLinuxArm64
;;
macos-latest)
./gradlew publishMacosX64PublicationToMavenCentral publishMacosArm64PublicationToMavenCentral
./gradlew compileKotlinMacosX64 compileKotlinMacosArm64
;;
esac
fi
publish:
name: Publish
needs: build
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '16'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Publish to Maven Central
run: ./gradlew publishAllJvmPublicationsToMavenCentralRepository
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
Expand Down

0 comments on commit aaa2623

Please sign in to comment.