Skip to content

Commit

Permalink
add publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
shalva97 committed May 3, 2024
1 parent c7b9db9 commit 4729773
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish package to GitHub Packages

on:
workflow_dispatch:

jobs:
publish:
runs-on: macos-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Publish package
uses: gradle/gradle-build-action@v2
with:
arguments: publishAllPublicationsToGitHubPackagesRepository
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12 changes: 12 additions & 0 deletions library/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/shalva97/overwatch-player-search-api")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}

0 comments on commit 4729773

Please sign in to comment.