From 1ef2045b3233b26eca3800598b64a3131b86a9ac Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 26 Mar 2024 22:14:18 -0700 Subject: [PATCH] Reworked GitHub workflows --- .github/workflows/gradle.yml | 7 ++- .github/workflows/publish-ios.yml | 37 ------------- .github/workflows/publish.yml | 90 ++++++------------------------- 3 files changed, 20 insertions(+), 114 deletions(-) delete mode 100644 .github/workflows/publish-ios.yml diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 5686c21..649163f 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -17,7 +17,7 @@ jobs: build: strategy: matrix: - java-version: [ 11, 17, 20 ] + java-version: [11, 17, 21] os: - macos-latest - ubuntu-latest @@ -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 @@ -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 diff --git a/.github/workflows/publish-ios.yml b/.github/workflows/publish-ios.yml deleted file mode 100644 index 8b4ba2c..0000000 --- a/.github/workflows/publish-ios.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: publish-ios - -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-ios: - runs-on: macos-latest - strategy: - max-parallel: 6 - matrix: - target: - - publishIosArm64PublicationToOSSRHRepository - - publishIosX64PublicationToOSSRHRepository - - publishIosSimulatorArm64PublicationToOSSRHRepository - 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 - run: ./gradlew ${{ matrix.target }} \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8ff6eb2..cd65021 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 \ No newline at end of file + run: ./gradlew publish --no-parallel --stacktrace