Skip to content

Commit

Permalink
publish snapshots to gh packages
Browse files Browse the repository at this point in the history
  • Loading branch information
wiyarmir committed Feb 27, 2024
1 parent 28ff263 commit 3f57d94
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/main_branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,12 @@ jobs:
gpg_private_key: ${{ secrets.GPG_KEY }}
passphrase: ${{ secrets.GPG_KEY_PASSWORD }}

- name: Publish to maven central
- name: Publish to GitHub Packages
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USER }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ORG_GRADLE_PROJECT_signingGnupgKeyName: ${{ secrets.GPG_KEY_ID }}
ORG_GRADLE_PROJECT_signingGnupgPassphrase: ${{ secrets.GPG_KEY_PASSWORD }}
run: ./gradlew publishAllPublicationsToCentralPortal
run: ./gradlew publishAllPublicationsToGitHubPackagesRepository

- name: Bundle the failed build report
if: failure()
Expand Down
11 changes: 10 additions & 1 deletion solana-kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@ signing {
publishing {
repositories {
mavenLocal()
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/avianlabs/solana-kotlin")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
publications {
withType<MavenPublication> {
Expand Down Expand Up @@ -149,7 +159,6 @@ publishing {
}

mavenPublishing {
publishToMavenCentral(SonatypeHost.DEFAULT)
if (rootProject.findProperty("signPublications") != "false") {
signAllPublications()
}
Expand Down

0 comments on commit 3f57d94

Please sign in to comment.