Skip to content

Commit

Permalink
#955 Publish to GitHub packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Adamczyk committed Aug 19, 2020
1 parent b49d09f commit 098d795
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
with:
gradle-executable: "./test_runner/gradlew"
arguments: "-p test_runner bintrayUpload -PJFROG_API_KEY=${{ secrets.JFROG_API_KEY }} -PJFROG_USER=${{ secrets.JFROG_USER }}"

- name: Authenticate to hub
run: |
mkdir -p ~/.config/
Expand Down Expand Up @@ -97,3 +97,10 @@ jobs:

- name: Sync bintray to maven central
run: flankScripts release jFrogSync --maven-tag=$MVN_VERSION

- name: Gradle Upload to GitHub packages
uses: eskatos/gradle-command-action@v1
with:
gradle-executable: "./test_runner/gradlew"
arguments: "-p test_runner publish -PGITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}"

12 changes: 11 additions & 1 deletion test_runner/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,21 @@ java {
}

publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/Flank/flank")
credentials {
username = System.getenv("GITHUB_ACTOR") ?: properties["GITHUB_ACTOR"].toString()
password = System.getenv("GITHUB_TOKEN") ?: properties["GITHUB_TOKEN"].toString()
}
}
}
publications {
create<MavenPublication>("mavenJava") {
groupId = "com.github.flank"
artifactId = artifactID
version = System.getenv("MVN_VERSION")
version = System.getenv("MVN_VERSION") ?: "local_snapshot"

artifact(shadowJar)
artifact(tasks["javadocJar"])
Expand Down

0 comments on commit 098d795

Please sign in to comment.