-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
94 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
name: Build WebApi FatJar | ||
on: | ||
push: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
name: Build DokkaGfm Documents | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,61 +9,72 @@ name: Publish KMP with Gradle | |
|
||
on: | ||
release: | ||
types: [created] | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
publish: | ||
strategy: | ||
matrix: | ||
os: [ macos-latest, windows-latest, ubuntu-latest ] | ||
|
||
runs-on: macos-latest | ||
runs-on: ${{ matrix.os }} | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
env: | ||
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | ||
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEYID }} | ||
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | ||
SIGNING_SECRET_KEY_RING_FILE: secret_ring.gpg | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 11 | ||
|
||
- name: Setup Java JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
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 | ||
distribution: temurin | ||
java-version: 17 | ||
cache: 'gradle' | ||
|
||
- name: Cache Kotlin/Native compiler | ||
id: cache-konan | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.konan | ||
key: ${{ runner.os }}-konan | ||
|
||
- uses: actions/setup-node@v4 | ||
- name: Set up Node.js 22-v8-canary | ||
name: Set up Node.js | ||
with: | ||
node-version: '22-v8-canary' | ||
node-version: '21-v8-canary' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Decode secret_ring.gpg | ||
env: | ||
SIGNING_SECRET_KEY_RING_BASE64: ${{ secrets.SIGNING_SECRET_KEY_RING_BASE64 }} | ||
run: | | ||
echo $SIGNING_SECRET_KEY_RING_BASE64 | base64 --decode > secret_ring.gpg | ||
- name: Write local.properties | ||
uses: christian-draeger/[email protected] | ||
with: | ||
path: local.properties | ||
# The property keys you want to write. Accepts an array. | ||
property: | | ||
'ossrhUsername' | ||
'ossrhPassword' | ||
'signing.keyId' | ||
'signing.password' | ||
'signing.secretKeyRingFile' | ||
# The property values you want to write (same order as the keys). Accepts an array. | ||
value: | | ||
${{ secrets.OSSRH_USERNAME }} | ||
${{ secrets.OSSRH_PASSWORD }} | ||
${{ secrets.SIGNING_KEYID }} | ||
${{ secrets.SIGNING_PASSWORD }} | ||
'secret_ring.gpg' | ||
echo $SIGNING_SECRET_KEY_RING_BASE64 | base64 --decode > $SIGNING_SECRET_KEY_RING_FILE | ||
- name: Publish mahjong-utils | ||
if: ${{ matrix.os == 'macos-latest' }} | ||
run: | | ||
./gradlew :mahjong-utils:publishAllPublicationsToSonatypeRepository | ||
- name: Publish mahjong-utils (linuxX64 only) | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
run: | | ||
./gradlew :mahjong-utils:publishLinuxX64PublicationToSonatypeRepository | ||
- name: Publish mahjong-utils (mingwX64 only) | ||
if: ${{ matrix.os == 'windows-latest' }} | ||
run: | | ||
./gradlew :mahjong-utils:publish | ||
./gradlew :mahjong-utils:publishMingwX64PublicationToSonatypeRepository | ||
- name: Publish mahjong-utils-entry for JS/WASM | ||
if: ${{ matrix.os == 'macos-latest' }} | ||
run: | | ||
./gradlew :mahjong-utils-entry:publishJsPackageToNpmjsRegistry | ||
./gradlew :mahjong-utils-entry:publishWasmJsPackageToNpmjsRegistry | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
kotlin.code.style=official | ||
|
||
group=io.github.ssttkkl | ||
version=0.6.0 | ||
version=0.6.1 | ||
|
||
org.gradle.jvmargs=-Xmx8g -Xms1g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,18 +16,6 @@ kotlin { | |
binaries.library() | ||
useCommonJs() | ||
} | ||
compilations["main"].packageJson { | ||
name = "mahjong-utils-entry" | ||
customField( | ||
"author", mapOf( | ||
"name" to "ssttkkl", | ||
"email" to "[email protected]" | ||
) | ||
) | ||
customField( | ||
"license", "MIT" | ||
) | ||
} | ||
} | ||
wasmJs { | ||
browser { | ||
|
@@ -53,6 +41,10 @@ kotlin { | |
} | ||
} | ||
|
||
afterEvaluate { | ||
tasks.getByName("assembleWasmJsPackage").dependsOn("compileProductionLibraryKotlinWasmJsOptimize") | ||
} | ||
|
||
val hostOs = System.getProperty("os.name") | ||
val isMingwX64 = hostOs.startsWith("Windows") | ||
val nativeTarget = targets.filterIsInstance<KotlinNativeTargetWithHostTests>().firstOrNull() | ||
|
@@ -98,6 +90,28 @@ kotlin { | |
} | ||
|
||
npmPublish { | ||
packages { | ||
get("js").apply { | ||
packageJson { | ||
name = "mahjong-utils-entry" | ||
author { | ||
name = "ssttkkl" | ||
email = "[email protected]" | ||
} | ||
license = "MIT" | ||
} | ||
} | ||
get("wasmJs").apply { | ||
packageJson { | ||
name = "mahjong-utils-entry-wasm" | ||
author { | ||
name = "ssttkkl" | ||
email = "[email protected]" | ||
} | ||
license = "MIT" | ||
} | ||
} | ||
} | ||
registries { | ||
register("npmjs") { | ||
uri.set("https://registry.npmjs.org") | ||
|