Skip to content

Align npm publish with trusted publishing and normalize package metadata - #18

Merged
hustcc merged 2 commits into
mainfrom
copilot/fix-ci-execution-error
May 21, 2026
Merged

hustcc merged 2 commits into
mainfrom
copilot/fix-ci-execution-error

Conversation

Copilot AI commented May 21, 2026

Copy link
Copy Markdown
Contributor

The publish job was failing at npm publish --provenance --access public with E404 after the package had already built and been packed successfully. This change set aligns the release path with npm trusted publishing expectations and removes metadata drift that npm was auto-correcting during publish.

  • Publish auth path

    • Remove token-based publish wiring from the workflow.
    • Keep the publish step on the provenance/OIDC path expected by npm trusted publishing.
    • Reduce workflow config that could cause npm to resolve auth inconsistently at publish time.
  • Package metadata normalization

    • Normalize repository in map/package.json to the object form npm expects.
    • Eliminate publish-time mutation of package metadata so the packed manifest matches the source manifest.
  • Release behavior

    • Keep the publish target as the map workspace package (amapcn).
    • Preserve npm publish --provenance --access public as the release command; the change is in how the package and workflow are prepared for that publish.
- uses: actions/setup-node@v4
  with:
    node-version: 20

- name: Publish map package
  working-directory: map
  run: npm publish --provenance --access public
{
  "repository": {
    "type": "git",
    "url": "git+https://github.com/hustcc/amapcn.git"
  }
}

Copilot AI and others added 2 commits May 21, 2026 01:48
Agent-Logs-Url: https://github.com/hustcc/amapcn/sessions/70dde235-8ad9-4536-8684-162f1aeb035f

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>
Agent-Logs-Url: https://github.com/hustcc/amapcn/sessions/3be074a1-2d6d-4dbb-a097-9f378b17d06d

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>
@hustcc
hustcc marked this pull request as ready for review May 21, 2026 05:57
@hustcc
hustcc merged commit 89cf8ba into main May 21, 2026
4 checks passed
@hustcc
hustcc deleted the copilot/fix-ci-execution-error branch May 21, 2026 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants