Skip to content

Commit 0dd1459

Browse files
committed
Updating publish.yaml to use new Sonatype publishing through MavenCentral
1 parent 311c2e4 commit 0dd1459

1 file changed

Lines changed: 10 additions & 15 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -49,23 +49,18 @@ jobs:
4949
- name: Setup gradle
5050
uses: gradle/gradle-build-action@v2
5151

52-
- name: Write secrets to local.properties
52+
- name: Set up Xcode version
53+
run: sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
54+
55+
- name: Publish to MavenCentral
5356
if: ${{ github.event_name != 'pull_request' }}
54-
run: |
55-
echo sonatypeUsername="${SONATYPE_USERNAME}" >> "local.properties"
56-
echo sonatypePassword="${SONATYPE_PASSWORD}" >> "local.properties"
57-
echo gpgKeyId="${GPG_KEY_ID}" >> "local.properties"
58-
echo gpgKeySecret="${GPG_KEY_SECRET}" >> "local.properties"
59-
echo gpgKeyPassword="${GPG_KEY_PASSWORD}" >> "local.properties"
57+
run: ./gradlew publishToMavenCentral --no-configuration-cache
6058
env:
61-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
62-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
63-
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
64-
GPG_KEY_SECRET: ${{ secrets.GPG_KEY_SECRET }}
65-
GPG_KEY_PASSWORD: ${{ secrets.GPG_KEY_PASSWORD }}
66-
67-
- name: Release to sonatype
68-
run: ./gradlew publish
59+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
60+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
61+
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GPG_KEY_ID }}
62+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_KEY_PASSWORD }}
63+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY_SECRET}}
6964

7065
documentation:
7166
name: Publish documentation

0 commit comments

Comments
 (0)