UID2-7263 Skip SNAPSHOT publishing in Android SDK build workflow#146
Open
cYKatherine wants to merge 1 commit into
Open
UID2-7263 Skip SNAPSHOT publishing in Android SDK build workflow#146cYKatherine wants to merge 1 commit into
cYKatherine wants to merge 1 commit into
Conversation
The "Deploy to Maven Central" step ran ./gradlew publish on every push to main. With SONATYPE_HOST=CENTRAL_PORTAL and VERSION_NAME=2.2.0-SNAPSHOT, the Central Portal rejects SNAPSHOTs with a 403 Forbidden, failing every build. Read VERSION_NAME from gradle.properties and gate the publish step so it only runs for non-SNAPSHOT (release) versions. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
Looking at the run history, we've had two successful runs that seem to have published snapshot versions since the 403: https://github.com/IABTechLab/uid2-android-sdk/actions/workflows/build.yml?query=branch%3Amain
I recommend we close this without merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
build.yml"Deploy to Maven Central" step runs./gradlew publishon every push tomain. The project is configured withSONATYPE_HOST=CENTRAL_PORTAL(gradle.properties), which routes publishes tocentral.sonatype.com. The Sonatype Central Portal does not support SNAPSHOT publishing — with the currentVERSION_NAME=2.2.0-SNAPSHOT, the step fails with a403 Forbiddenon every push tomain.Change
Read version namestep that extractsVERSION_NAMEfromgradle.propertiesinto a step output.!endsWith(steps.version.outputs.name, '-SNAPSHOT')so it only runs for release (non-SNAPSHOT) versions.Acceptance criteria
mainno longer fail due to the SNAPSHOT publish step (step is now skipped for-SNAPSHOT)References
🤖 Generated with Claude Code