Skip to content

Publish Packages workflow fails on every run with 401 from repo.dansplugins.com #131

Description

@dmccoystephenson

The Publish Packages to GitHub workflow has failed on every run since it was added — the most recent failures are runs 31271862635 (release, 2026-08-08) and 31271723230 (push to main, 2026-08-08), and the same failure is present on the #127 and #128 merges.

Cause

The workflow's final step is named "Publish to GitHub Packages" but invokes the aggregate task:

- name: Publish to GitHub Packages
  run: ./gradlew publish

publish runs every publication/repository pair, not just GitHub Packages. Each module's publishing block declares two repositories — GitHubPackages and DansPlugins — so publishMavenPublicationToDansPluginsRepository is executed as well. Its credentials are read from the repository-root repo.properties, which is committed with the placeholder values repo-username=test / repo-password=test2, and the workflow sets no override. The run therefore ends with:

> Task :ponder-bukkit:publishMavenPublicationToDansPluginsRepository FAILED
> Failed to publish publication 'maven' to repository 'DansPlugins'
   > Could not PUT 'https://repo.dansplugins.com/repository/maven-releases/com/dansplugins/ponder-bukkit/3.0.0-SNAPSHOT-8-8-2026/ponder-bukkit-3.0.0-SNAPSHOT-8-8-2026.jar'. Received status code 401 from server: Unauthorized

Because ponder-bukkit fails first, it is unclear from the logs whether the GitHub Packages publication for the other two modules ever completed.

Options

  1. Narrow the workflow step to the GitHub Packages repository only (./gradlew publishAllPublicationsToGitHubPackagesRepository), leaving the DansPlugins repository to a credentialed release path.
  2. Supply real DansPlugins credentials to the workflow as repository secrets and have each module's publishing block prefer environment variables over repo.properties.
  3. Register the DansPlugins repository conditionally, only when non-placeholder credentials are present.

Option 1 is the smallest change that makes the workflow reflect its own name and stop failing.

Why this is not being fixed autonomously

Both the fix sites — .github/workflows/publish-packages.yml and the publishing { ... } blocks in the three module build.gradle files — are on this repository's do-not-auto-merge list, because a change to the release pipeline affects every downstream consumer resolving Ponder from repo.dansplugins.com. A decision between the options above is wanted from a maintainer before any change is made.

Related to #124, which tracks publishing to the dansplugins.com Maven repository.

This issue body was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions