Skip to content

Commit b226a9e

Browse files
committed
wip: fix setup-java to use Central creds from secrets (401 fix)
1 parent f1504ab commit b226a9e

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

.github/workflows/release-on-tag.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ jobs:
2929
java-version: '21'
3030
cache: maven
3131
server-id: central
32-
server-username: CENTRAL_USERNAME
33-
server-password: CENTRAL_PASSWORD
32+
server-username: ${{ secrets.CENTRAL_USERNAME }}
33+
server-password: ${{ secrets.CENTRAL_PASSWORD }}
3434
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
3535
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
3636

AGENTS.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,11 @@ Automated Release (preferred)
8484
- Push a tag named `release/X.Y.Z` (semver, no leading `v`).
8585
- The workflow `.github/workflows/release-on-tag.yml` will:
8686
- Create a GitHub Release for that tag with autogenerated notes.
87-
- Build and deploy artifacts to Maven Central with `-P release` (Central Publishing plugin). Uses `-Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}` and optionally `-Dgpg.keyname=${{ secrets.GPG_KEYNAME }}` for signing when set.
88-
- Create a branch `release-bot-YYYYMMDD-HHMMSS` at the tagged commit and open a PR back to `main` (no version bumps).
87+
- Build and deploy artifacts to Maven Central with `-P release` (Central Publishing plugin). Uses `-Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}` and optionally `-Dgpg.keyname=${{ secrets.GPG_KEYNAME }}` for signing when set.
88+
- Create a branch `release-bot-YYYYMMDD-HHMMSS` at the tagged commit and open a PR back to `main` (no version bumps).
89+
90+
Credentials wiring
91+
- The workflow writes `<server id="central">` to settings.xml using `server-username: ${{ secrets.CENTRAL_USERNAME }}` and `server-password: ${{ secrets.CENTRAL_PASSWORD }}`. Ensure those secrets hold your Central Publishing token creds for `io.github.simbo1905`.
8992

9093
Manual Release (local)
9194
- Ensure POM version is your intended release version.

RELEASE-GIST.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ jobs:
2727
java-version: '21'
2828
cache: maven
2929
server-id: central
30-
server-username: CENTRAL_USERNAME
31-
server-password: CENTRAL_PASSWORD
30+
server-username: ${{ secrets.CENTRAL_USERNAME }}
31+
server-password: ${{ secrets.CENTRAL_PASSWORD }}
3232
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
3333
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
3434
- uses: softprops/action-gh-release@v2

0 commit comments

Comments
 (0)