mirror of
https://github.com/AdrianKuta/Tree-Data-Structure.git
synced 2025-07-01 15:27:58 +02:00
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:
24
.github/workflows/build.yml
vendored
24
.github/workflows/build.yml
vendored
@ -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
|
@ -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
34
.github/workflows/publishSnapshot.yml
vendored
Normal 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
|
7
.github/workflows/test.yml
vendored
7
.github/workflows/test.yml
vendored
@ -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
|
Reference in New Issue
Block a user