Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 33 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,41 @@ jobs:
run: ./mvnw -B versions:set -DnewVersion=${GITHUB_REF_NAME#v} -DgenerateBackupPoms=false

- name: Publish to Maven Central
run: ./mvnw clean deploy -P release -B --no-transfer-progress -DskipTests
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
OSSRH_USERNAME_RAW: ${{ secrets.OSSRH_USERNAME }}
OSSRH_TOKEN_RAW: ${{ secrets.OSSRH_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
set -euo pipefail

# Central Portal's User Token gives a cleartext (namecode, password) pair
# that goes into settings.xml as <username>/<password>. Maven does the
# Basic-Auth base64 encoding itself. If OSSRH_TOKEN is already a
# base64(user:pass) bearer-style string, Maven would double-encode it
# and the Portal returns 401. Detect that form and decode it.
OSSRH_USERNAME="$OSSRH_USERNAME_RAW"
OSSRH_TOKEN="$OSSRH_TOKEN_RAW"
shape="raw cleartext password"
if decoded=$(printf %s "$OSSRH_TOKEN_RAW" | base64 -d 2>/dev/null) \
&& [[ "$decoded" == *:* ]] \
&& [[ "$decoded" =~ ^[[:print:]]+$ ]]; then
decoded_user="${decoded%%:*}"
decoded_pass="${decoded#*:}"
if [[ -n "$decoded_user" && -n "$decoded_pass" ]]; then
shape="base64(user:pass) — decoded for Maven"
OSSRH_USERNAME="$decoded_user"
OSSRH_TOKEN="$decoded_pass"
if [[ -n "$OSSRH_USERNAME_RAW" && "$OSSRH_USERNAME_RAW" != "$decoded_user" ]]; then
echo "::warning::OSSRH_USERNAME secret does not match the user portion of the decoded OSSRH_TOKEN; using the decoded value."
fi
fi
fi
echo "::add-mask::$OSSRH_USERNAME"
echo "::add-mask::$OSSRH_TOKEN"
echo "OSSRH_TOKEN shape detected: $shape"
export OSSRH_USERNAME OSSRH_TOKEN

./mvnw clean deploy -P release -B --no-transfer-progress -DskipTests

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
Expand Down
5 changes: 5 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Claude / Agent Instructions

See [`docs/AGENTS.md`](docs/AGENTS.md) for the full agent and contributor guide, including project overview, guiding principles, repository structure, coding standards, testing standards, and commit message conventions.

All instructions in `docs/AGENTS.md` apply to Claude Code sessions in this repository.
2 changes: 1 addition & 1 deletion didwebvh-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.github.decentralizedidentity</groupId>
<groupId>io.github.decentralized-identity</groupId>
<artifactId>didwebvh-java</artifactId>
<version>0.2.0-SNAPSHOT</version>
</parent>
Expand Down
4 changes: 2 additions & 2 deletions didwebvh-signing-local/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.github.decentralizedidentity</groupId>
<groupId>io.github.decentralized-identity</groupId>
<artifactId>didwebvh-java</artifactId>
<version>0.2.0-SNAPSHOT</version>
</parent>
Expand All @@ -16,7 +16,7 @@

<dependencies>
<dependency>
<groupId>io.github.decentralizedidentity</groupId>
<groupId>io.github.decentralized-identity</groupId>
<artifactId>didwebvh-core</artifactId>
</dependency>
<dependency>
Expand Down
6 changes: 3 additions & 3 deletions didwebvh-wizard/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.github.decentralizedidentity</groupId>
<groupId>io.github.decentralized-identity</groupId>
<artifactId>didwebvh-java</artifactId>
<version>0.2.0-SNAPSHOT</version>
</parent>
Expand All @@ -16,11 +16,11 @@

<dependencies>
<dependency>
<groupId>io.github.decentralizedidentity</groupId>
<groupId>io.github.decentralized-identity</groupId>
<artifactId>didwebvh-core</artifactId>
</dependency>
<dependency>
<groupId>io.github.decentralizedidentity</groupId>
<groupId>io.github.decentralized-identity</groupId>
<artifactId>didwebvh-signing-local</artifactId>
</dependency>
<dependency>
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>io.github.decentralizedidentity</groupId>
<groupId>io.github.decentralized-identity</groupId>
<artifactId>didwebvh-java</artifactId>
<version>0.2.0-SNAPSHOT</version>
<packaging>pom</packaging>
Expand Down Expand Up @@ -86,12 +86,12 @@
<dependencies>
<!-- Internal modules -->
<dependency>
<groupId>io.github.decentralizedidentity</groupId>
<groupId>io.github.decentralized-identity</groupId>
<artifactId>didwebvh-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.github.decentralizedidentity</groupId>
<groupId>io.github.decentralized-identity</groupId>
<artifactId>didwebvh-signing-local</artifactId>
<version>${project.version}</version>
</dependency>
Expand Down
Loading