Skip to content
Merged
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
16 changes: 14 additions & 2 deletions .github/workflows/maven-central-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -341,19 +341,24 @@ jobs:
rm -rf .gradle/ || true
find . -name "build" -type d -exec rm -rf {} + || true

# Clean Maven local repository for this project's artifacts to prevent conflicts
rm -rf ~/.m2/repository/io/github/truenine/ || true

# First clean everything
./gradlew clean \
--no-daemon \
--no-parallel \
--no-build-cache \
--no-configuration-cache

# Then run dry publication
# Then run dry publication with additional safeguards
./gradlew publishToMavenLocal \
--no-daemon \
--no-parallel \
--no-build-cache \
--no-configuration-cache \
--rerun-tasks \
--max-workers=1 \
-PsigningInMemoryKeyId="${{ secrets.GPG_KEY_ID }}" \
-PsigningInMemoryKey="${{ secrets.GPG_PRIVATE_KEY }}" \
-PsigningInMemoryKeyPassword="${{ secrets.GPG_PASSPHRASE }}"
Expand Down Expand Up @@ -459,6 +464,11 @@ jobs:
rm -rf .gradle/ || true
find . -name "build" -type d -exec rm -rf {} + || true

# Clean Maven local repository for this project's artifacts to prevent conflicts
rm -rf ~/.m2/repository/io/github/truenine/ || true

echo "Cleaned build services and Maven local repository" >> $GITHUB_STEP_SUMMARY

echo "Starting clean publication process..." >> $GITHUB_STEP_SUMMARY

# First clean everything to ensure no stale artifacts
Expand All @@ -468,12 +478,14 @@ jobs:
--no-build-cache \
--no-configuration-cache

# Then publish with fresh state
# Then publish with fresh state and additional safeguards
./gradlew publishToMavenCentral \
--no-daemon \
--no-parallel \
--no-build-cache \
--no-configuration-cache \
--rerun-tasks \
--max-workers=1 \
-PsigningInMemoryKeyId="${{ secrets.GPG_KEY_ID }}" \
-PsigningInMemoryKey="${{ secrets.GPG_PRIVATE_KEY }}" \
-PmavenCentralUsername="${{ secrets.MAVENCENTRAL_USERNAME }}" \
Expand Down