diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9e03bc0..b72910f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ on: jobs: unitTest: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Checkout the project uses: actions/checkout@v2 @@ -28,4 +28,26 @@ 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 + needs: unitTest + 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: Build the project + run: ./gradlew build --stacktrace + - name: Publish package to Github + run: ./gradlew publish + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/build.gradle b/build.gradle index f5e3a6a..1175884 100644 --- a/build.gradle +++ b/build.gradle @@ -123,10 +123,20 @@ publishing { maven(MavenPublication) { // publish to Jitpack groupId 'io.bimmergestalt' - artifactId 'IDriveConnectKit' + artifactId 'idriveconnectkit' version '0.6' from components.java } } + repositories { + maven { + name = "GitHubPackages" + url = "https://maven.pkg.github.com/BimmerGestalt/IDriveConnectKit" + credentials { + username = System.getenv("GITHUB_ACTOR") + password = System.getenv("GITHUB_TOKEN") + } + } + } }