Skip to content

Commit 62fc6ed

Browse files
committed
chore(workflow): centralize Sonatype credentials in env section
Move Sonatype and signing secrets to the environment block for cleaner and more secure workflow configuration.
1 parent ef51a46 commit 62fc6ed

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/releaase-to-central-sonatype.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ jobs:
2828
permissions:
2929
contents: write
3030
actions: read
31+
env:
32+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
33+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
34+
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
35+
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
3136
steps:
3237
- name: Checkout sources
3338
uses: actions/checkout@v4
@@ -74,9 +79,4 @@ jobs:
7479
generate_release_notes: true
7580

7681
- name: Publish to Maven Central via Sonatype Portal
77-
run: ./gradlew publishToCentral -PLIBRARY_VERSION=${{ inputs.version }}
78-
env:
79-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
80-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
81-
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
82-
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
82+
run: ./gradlew publishToCentral -PLIBRARY_VERSION=${{ inputs.version }}

0 commit comments

Comments
 (0)