Skip to content

Commit

Permalink
Implement maven deployment and update versions
Browse files Browse the repository at this point in the history
  • Loading branch information
floschu committed Oct 17, 2021
1 parent da6568e commit 8295d47
Show file tree
Hide file tree
Showing 22 changed files with 186 additions and 442 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build
name: "build"

on: push

Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/deploy-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: "deploy release"

on:
push:
tags-ignore:
- '*-SNAPSHOT'

jobs:
all_checks:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v1
- name: "Set up Java"
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: "Checks all the things"
run: ./gradlew lint ktlintCheck test jacocoTestCoverageVerification pitest apiCheck assemble

publish:
needs: [ all_checks ]
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v1
- name: "Set up Java"
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: "Get tag and save into env"
uses: olegtarasov/[email protected]
id: tagName
- name: "Upload release"
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel
env:
libraryVersionTag: ${{ steps.tagName.outputs.tag }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
- name: "Publish release"
run: ./gradlew closeAndReleaseRepository --no-daemon --no-parallel
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: deploy
name: "deploy snapshot"

on:
push:
tags:
- '*'
- '*-SNAPSHOT'

jobs:
all_checks:
Expand All @@ -19,7 +19,7 @@ jobs:
run: ./gradlew lint ktlintCheck test jacocoTestCoverageVerification pitest apiCheck assemble

publish:
needs: [all_checks]
needs: [ all_checks ]
runs-on: ubuntu-latest
steps:
- name: "Checkout"
Expand All @@ -29,11 +29,11 @@ jobs:
with:
java-version: 1.8
- name: "Get tag and save into env"
uses: olegtarasov/get-tag@v1
uses: olegtarasov/get-tag@v2.1
id: tagName
- name: "Build, publish and upload to Bintray"
- name: "Upload release"
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel
env:
libraryVersionTag: ${{ steps.tagName.outputs.tag }}
bintrayUser: ${{ secrets.BINTRAY_USER }}
bintrayApiKey: ${{ secrets.BINTRAY_TOKEN }}
run: ./gradlew build publish bintrayUpload
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
4 changes: 1 addition & 3 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 0 additions & 13 deletions .idea/runConfigurations.xml

This file was deleted.

Binary file removed .media/btc.png
Binary file not shown.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@

- binary compatibility will now be verified and held up on every release.

## `[0.14.0]` - 2021-XX-XX
## `[0.14.0]` - 2021-10-17

- Update kotlinx.coroutines to `1.4.3`.
- Update kotlinx.coroutines to `1.5.2`.
- Remove kotlin as `api` dependency.
- Remove `ControllerLog.default`.
- Lazily start controller when accessing `Controller.effects` field (#26)
- `control-core` will now be deployed to mavenCentral

## `[0.13.1]` - 2020-09-13

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ test coverage is automatically run by github actions on `[push]`

| | threshold | run | output |
|---:|:---:|---|---|
| instruction/branch | 90% | `./gradlew test jacocoTestReport` | `./control-core/build/reports/jacoco/` |
| instruction/branch | 94% | `./gradlew test jacocoTestReport` | `./control-core/build/reports/jacoco/` |
| mutation | 100% | `./gradlew pitest` | `./control-core/build/reports/pitest/` |

## author
Expand Down
23 changes: 13 additions & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,22 @@ buildscript {
}

dependencies {
classpath(Libs.kotlin_gradle_plugin)
classpath(Libs.com_jfrog_bintray_gradle_plugin)
classpath(Libs.com_android_tools_build_gradle)
classpath(Libs.kotlin_serialization)
classpath(Libs.gradle_pitest_plugin)
classpath(Libs.binary_compatibility_validator)
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0")
classpath("info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.7.0")
classpath("org.jetbrains.kotlinx:binary-compatibility-validator:0.7.1")
classpath("com.vanniktech:gradle-maven-publish-plugin:0.18.0")
classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.5.31")

classpath("com.android.tools.build:gradle:4.2.2")
classpath("org.jetbrains.kotlin:kotlin-serialization:1.5.31")
}
}

plugins {
buildSrcVersions
jacoco
id("org.jlleitschuh.gradle.ktlint").version(Versions.org_jlleitschuh_gradle_ktlint_gradle_plugin)
id("org.jlleitschuh.gradle.ktlint").version("10.0.0")
`maven-publish`
signing
}

// ---- api-validation --- //
Expand All @@ -30,7 +33,7 @@ configure<kotlinx.validation.ApiValidationExtension> {
ignoredProjects.addAll(listOf("kotlin-counter", "android-counter", "android-github"))
}

// ---- api-validation --- //
// ---- end api-validation --- //

// ---- jacoco --- //

Expand All @@ -46,7 +49,7 @@ subprojects {
}
}

// ---- jacoco --- //
// ---- end jacoco --- //

allprojects {
repositories {
Expand Down
3 changes: 0 additions & 3 deletions buildSrc/.gitignore

This file was deleted.

9 changes: 0 additions & 9 deletions buildSrc/build.gradle.kts

This file was deleted.

Loading

0 comments on commit 8295d47

Please sign in to comment.