Skip to content

Commit

Permalink
Reworked GitHub workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ethauvin committed Mar 27, 2024
1 parent d03c61c commit 1ef2045
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 114 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
build:
strategy:
matrix:
java-version: [ 11, 17, 20 ]
java-version: [11, 17, 21]
os:
- macos-latest
- ubuntu-latest
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
distribution: 'zulu'
distribution: "zulu"
java-version: ${{ matrix.java-version }}

- name: Validate Gradle wrapper
Expand All @@ -43,8 +43,7 @@ jobs:
id: cache-kotlin-konan
uses: actions/cache@v3
with:
path: |
~/.konan/**/*
path: ~/.konan/**/*
key: kotlin-konan-${{ runner.os }}

- name: Test with Gradle
Expand Down
37 changes: 0 additions & 37 deletions .github/workflows/publish-ios.yml

This file was deleted.

90 changes: 17 additions & 73 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,93 +4,37 @@ on:
workflow_dispatch:

env:
JAVA_VERSION: 11
JAVA_DISTRIBUTION: 'zulu'
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.OSSRH_USERNAME}}
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_PASSWORD}}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGN_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGN_SECRET_PWD }}

jobs:
publish-base:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}

- uses: gradle/gradle-build-action@v2

- name: Publish Multiplatform release
run: ./gradlew publishKotlinMultiplatformPublicationToOSSRHRepository

- name: Publish JVM release
run: ./gradlew publishJvmPublicationToOSSRHRepository

- name: Publish JS release
run: ./gradlew publishJsPublicationToOSSRHRepository
publish:
runs-on: macos-latest
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-XX:MaxMetaspaceSize=512m"

publish-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v3
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: "11"
distribution: "zulu"
cache: "gradle"

- uses: gradle/gradle-build-action@v2

- name: Publish Linux x64 release
run: ./gradlew publishLinuxX64PublicationToOSSRHRepository

publish-mac:
runs-on: macos-latest
strategy:
max-parallel: 6
matrix:
target:
- publishMacosArm64PublicationToOSSRHRepository
- publishMacosX64PublicationToOSSRHRepository
- publishIosArm64PublicationToOSSRHRepository
- publishIosX64PublicationToOSSRHRepository
- publishIosSimulatorArm64PublicationToOSSRHRepository
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v3
- name: Cache Kotlin Konan
id: cache-kotlin-konan
uses: actions/cache@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
path: ~/.konan/**/*
key: kotlin-konan-${{ runner.os }}

- uses: gradle/gradle-build-action@v2
- name: Build
uses: gradle/gradle-build-action@v2

- name: Publish
run: ./gradlew ${{ matrix.target }}

publish-windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}

- uses: gradle/gradle-build-action@v2

- name: Publish MinGW x64 release
run: ./gradlew publishMingwX64PublicationToOSSRHRepository
run: ./gradlew publish --no-parallel --stacktrace

0 comments on commit 1ef2045

Please sign in to comment.