From a4dc6569c28747ca37c1db7d46ae55c53dde74fd Mon Sep 17 00:00:00 2001 From: ObserverOfTime Date: Thu, 18 Apr 2024 16:01:32 +0300 Subject: [PATCH] ci: fix publish workflow --- .github/workflows/publish.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e1732f0..d423b79 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -51,20 +51,20 @@ jobs: gradle/wrapper/gradle-wrapper.properties - name: Set up cross compilation run: sudo apt-get install -qy {binutils,gcc}-aarch64-linux-gnu - if: matrix.platform == 'linux-arm64' + if: matrix.platform == 'linux-arm64' || matrix.platform == 'common' - name: Get the Kotlin version id: kotlin shell: sh run: >- sed -n 's/kotlin-stdlib = "\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)"/version=\1\2\3/p' gradle/libs.versions.toml >> "$GITHUB_OUTPUT" - - name: Cache Kotlin/Native prebuilt - uses: actions/cache@v4 + - name: Restore Kotlin/Native prebuilt + uses: actions/cache/restore@v4 with: path: ${{runner.tool_cache}}/konan/kotlin-native-prebuilt-* key: konan-${{matrix.os}}-prebuilt-${{steps.kotlin.outputs.version}} - - name: Cache Kotlin/Native dependencies - uses: actions/cache@v4 + - name: Restore Kotlin/Native dependencies + uses: actions/cache/restore@v4 if: endsWith(matrix.platform, '64') with: path: ${{runner.tool_cache}}/konan/dependencies @@ -72,7 +72,17 @@ jobs: konan-${{matrix.os}}-dependencies-${{ matrix.platform == 'ios-arm64' && 'macos-arm64' || matrix.platform}} - name: Publish packages - run: ./gradlew --no-daemon ${{matrix.target}} + shell: bash + run: |- + target='publish${{matrix.target}}PublicationToGitHubRepository' + if [[ '${{matrix.platform}}' == 'common' ]]; then + ./gradlew --no-daemon ":kbigint:$target" ":kbigint-serialization:$target" + else + ./gradlew --no-daemon ":kbigint:$target" + fi env: + GITHUB_TOKEN: ${{github.token}} + SIGNING_KEY: ${{secrets.SIGNING_KEY}} + SIGNING_PASSWORD: ${{secrets.SIGNING_PASSWORD}} GRADLE_USER_HOME: ${{runner.tool_cache}}/gradle KONAN_DATA_DIR: ${{runner.tool_cache}}/konan