From fdc1789bde5fb300fba7748bd3c0b1150dd8eb6b Mon Sep 17 00:00:00 2001 From: ssttkkl Date: Wed, 13 Dec 2023 23:16:37 +0800 Subject: [PATCH] Update gradle-publish.yml --- .github/workflows/gradle-publish.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle-publish.yml b/.github/workflows/gradle-publish.yml index 3895d3c..fa34ff0 100644 --- a/.github/workflows/gradle-publish.yml +++ b/.github/workflows/gradle-publish.yml @@ -5,7 +5,7 @@ # This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created # For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle -name: Publish KMP +name: Publish KMP with Gradle on: release: @@ -28,7 +28,12 @@ jobs: distribution: 'temurin' server-id: github # Value of the distributionManagement/repository/id field of the pom.xml settings-path: ${{ github.workspace }} # location for the settings.xml file - + + - uses: actions/setup-node@v4 + - name: Set up Node.js 22-v8-canary + with: + node-version: '22-v8-canary' + - name: Decode secret_ring.gpg env: SIGNING_SECRET_KEY_RING_BASE64: ${{ secrets.SIGNING_SECRET_KEY_RING_BASE64 }} @@ -57,3 +62,10 @@ jobs: - name: Publish mahjong-utils run: | ./gradlew :mahjong-utils:publish + + - name: Publish mahjong-utils-entry for JS/WASM + run: | + ./gradlew :mahjong-utils-entry:publishJsPackageToNpmjsRegistry + ./gradlew :mahjong-utils-entry:publishWasmJsPackageToNpmjsRegistry + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}