diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9e03bc0..bd0cb83 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,4 +28,27 @@ jobs: - name: Upload coverage results run: ./gradlew coverage coveralls --stacktrace env: - COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} \ No newline at end of file + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout the project + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Validate Gradle Wrapper + uses: gradle/wrapper-validation-action@v1 + + - name: Set release name + run: sed -i "s/^\s+version '.*'/version '${{ github.event.inputs.version }}'/" build.gradle && cat build.gradle + if: ${{ github.event.inputs.version }} + - name: Build the project + run: ./gradlew build --stacktrace + - name: Publish package to Github + run: ./gradlew publish + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/core/build.gradle b/core/build.gradle index d83be44..cdec09f 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -23,7 +23,7 @@ kotlin { } jvmMain { dependencies { - implementation project(path: ':IDriveConnectKitEtch') + implementation project(path: ':idriveconnectkit-etch') } } @@ -41,8 +41,18 @@ publishing { maven(MavenPublication) { // publish to Jitpack groupId 'io.bimmergestalt' - artifactId 'IDriveConnectKit' - version '0.6' + artifactId 'idriveconnectkit' + version '0.6-etch-split' + } + } + repositories { + maven { + name = "GitHubPackages" + url = "https://maven.pkg.github.com/BimmerGestalt/IDriveConnectKit" + credentials { + username = System.getenv("GITHUB_ACTOR") + password = System.getenv("GITHUB_TOKEN") + } } } } diff --git a/etch/build.gradle b/etch/build.gradle index 78e78be..804a1a8 100644 --- a/etch/build.gradle +++ b/etch/build.gradle @@ -85,8 +85,8 @@ publishing { maven(MavenPublication) { // publish to Jitpack groupId 'io.bimmergestalt' - artifactId 'IDriveConnectKitEtch' - version '0.6' + artifactId 'idriveconnectkit-etch' + version '0.6-etch-split' from components.java } diff --git a/settings.gradle b/settings.gradle index 2235034..7c33ae8 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1,3 @@ include ':core', ':etch' -project(':core').name = "IDriveConnectKit" -project(':etch').name = "IDriveConnectKitEtch" \ No newline at end of file +project(':core').name = "idriveconnectkit" +project(':etch').name = "idriveconnectkit-etch" \ No newline at end of file