Skip to content

Commit

Permalink
Try publishing the package to Github
Browse files Browse the repository at this point in the history
  • Loading branch information
hufman committed May 2, 2024
1 parent a3eba6a commit 27f47f3
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -28,4 +28,26 @@ jobs:
- name: Upload coverage results
run: ./gradlew coverage coveralls --stacktrace
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
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 }}
12 changes: 11 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}
}
}

0 comments on commit 27f47f3

Please sign in to comment.