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 4fce8ab
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 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 }}
8 changes: 8 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ apply plugin: 'maven-publish'

repositories {
mavenCentral()
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/BimmerGestalt/IDriveConnectKit"
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}

dependencies {
Expand Down

0 comments on commit 4fce8ab

Please sign in to comment.