Skip to content

Commit

Permalink
publish to Maven Central instead of Bintray
Browse files Browse the repository at this point in the history
  • Loading branch information
SlashNephy committed Feb 12, 2021
1 parent d0baa80 commit 843ac57
Show file tree
Hide file tree
Showing 6 changed files with 202 additions and 245 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release

on:
release:
types:
- published

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Using Caches
uses: actions/cache@v2.1.3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Setup JDK
uses: actions/setup-java@v1.4.3
with:
java-version: 1.8

- name: Grant Execute Permission to gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew build

- name: Build & Release to Maven Central
run: ./gradlew publishToMavenLocal publish closeAndReleaseRepository
env:
VERSION: ${{ github.event.release.tag_name }}

OSSRH_PROFILE_ID: ${{ secrets.OSSRH_PROFILE_ID }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEYID: ${{ secrets.SIGNING_KEYID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
GITHUB_USERNAME: x-access-token
GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.gradle/
.idea/

.run/
.gradle/
build/
out/
35 changes: 5 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,43 +63,18 @@ fun main() {
}
```

Get Started
-----------
# Get Started

[![GitHub release (latest by date)](https://img.shields.io/github/v/release/StarryBlueSky/Json.kt)](https://github.com/StarryBlueSky/Json.kt/releases)

`build.gradle.kts`

```kotlin
repositories {
mavenCentral()
jcenter()

maven(url = "https://dl.bintray.com/starry-blue-sky/stable")
// or dev repository if EAP builds preferred
// maven(url = "https://dl.bintray.com/starry-blue-sky/dev")
}

kotlin {
sourceSets {
named("commonMain") {
dependencies {
implementation("blue.starry:jsonkt:$jsonkt_version")
}
}

// Json.kt v6.0+: Not needed anymore
named("jvmMain") {
}
named("jsMain") {
}
}
dependencies {
implementation("blue.starry:jsonkt:$JsonKtVersion")
}
```

License
---------
# License

Json.kt is provided under MIT License.

Copyright (c) 2017-2020 StarryBlueSky.
Copyright (c) 2017-2021 StarryBlueSky.
Loading

0 comments on commit 843ac57

Please sign in to comment.