Skip to content

Commit

Permalink
Add Maven publishing workflow (#1)
Browse files Browse the repository at this point in the history
* Change SonatypeHost to S01

* Initial publish action
  • Loading branch information
demonsh authored Dec 11, 2024
1 parent 4d8da8d commit 0f89e96
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish to Maven Central

on:
workflow_dispatch:

jobs:
build-and-publish:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

- name: Setup Gradle Cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build and Publish Library
run: |
set -e # Exit on any error
./gradlew clean build
./gradlew publishReleasePublicationToMavenRepository --info
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}
2 changes: 1 addition & 1 deletion circomwitnesscalc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ mavenPublishing {
}
}

publishToMavenCentral(SonatypeHost.DEFAULT)
publishToMavenCentral(SonatypeHost.S01)

signAllPublications()
}

0 comments on commit 0f89e96

Please sign in to comment.