10 Convert into multiplatform library (#13)

* 10: Convert library into Kotlin Multiplatform library

* 10: Setup CI

* 10: Setup CI

* 10: Test CI

* 10: Test CI

* 10: Test CI

* 10: Test CI

* 10: Test CI

* 10: Test CI

* 10: Test CI
This commit is contained in:
2022-12-15 15:34:36 +01:00
committed by GitHub
parent 72c94f280d
commit dd773e3b16
63 changed files with 2467 additions and 1104 deletions

View File

@ -1,24 +0,0 @@
name: Build
on: pull_request
jobs:
build:
name: Check project build
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: adopt
java-version: 11
# Builds the release artifacts of the library
- name: Build
run: ./gradlew assemble
# Generates other artifacts (javadocJar is optional)
- name: Source jar and dokka
run: ./gradlew androidSourcesJar javadocJar

View File

@ -7,7 +7,7 @@ on:
jobs:
publish:
name: Release build and publish
name: Publish Production
runs-on: ubuntu-latest
steps:
- name: Check out code
@ -18,17 +18,9 @@ jobs:
distribution: adopt
java-version: 11
# Builds the release artifacts of the library
- name: Release build
run: ./gradlew :treedatastructure:assembleRelease
# Generates other artifacts (javadocJar is optional)
- name: Source jar and dokka
run: ./gradlew androidSourcesJar javadocJar
# Runs upload, and then closes & releases the repository
- name: Publish to MavenCentral
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository
run: ./gradlew publish --max-workers 1
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
@ -36,3 +28,4 @@ jobs:
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
SNAPSHOT: false

34
.github/workflows/publishSnapshot.yml vendored Normal file
View File

@ -0,0 +1,34 @@
name: Publish Snapshot
on:
workflow_run:
workflows: [Test]
branches-ignore: [main]
types:
- completed
jobs:
publish:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Publish Snapshot
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: adopt
java-version: 11
# Runs upload, and then closes & releases the repository
- name: Publish to snapshot to Sonatype
run: ./gradlew publish --max-workers 1
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
SNAPSHOT: false

View File

@ -1,9 +1,6 @@
name: Test
on:
pull_request:
branches:
- master
on: [push]
jobs:
build:
@ -20,4 +17,4 @@ jobs:
# Builds the release artifacts of the library
- name: Test
run: ./gradlew test
run: ./gradlew test