Skip to content

Commit

Permalink
Set up publishing to GitHub Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
fsteeg committed Mar 12, 2021
1 parent 05fdf21 commit 1534b70
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Publish package to GitHub Packages
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Publish package
run: gradle publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

13 changes: 13 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -338,3 +338,16 @@ def static extractVersionFromBranch(branch) {
}
return matcher.group(1)
}

publishing {
repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/metafacture/metafacture-core"
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}

0 comments on commit 1534b70

Please sign in to comment.