Skip to content

feat: update CI with auto-deploy and auto-incrementing versions - #12

Open
jcary741 wants to merge 2 commits into
publisher-productionfrom
ci-auto-release
Open

jcary741 wants to merge 2 commits into
publisher-productionfrom
ci-auto-release

Conversation

@jcary741

Copy link
Copy Markdown

Releases and the demo site deploy automatically from a single main branch, replacing the manual npm release and the Publisher deploy.

Running the workflow manually on a branch publishes a prerelease to npm and deploys the demo to labs staging.

Also fixes packaging: dist/ is gitignored and nothing built it before publish, so a publish from the repo would have shipped without its main entry. Adds "files": ["dist"] and a prepublishOnly compile (the tarball is now just LICENSE, README, dist/to-color.js and package.json). Bumps .nvmrc from 22 to 24 (npm Trusted Publishing needs Node 20.17+), and normalizes repository.url for npm provenance.

Blocked by https://github.com/mapbox/gitops-infra/pull/2814

TODO

Before merge:

  • Configure Trusted Publishing for @mapbox/to-color on npmjs (workflow npm-release.yml, environment npm-release).
  • Create the npm-release GitHub Environment in this repo.

After merging:

  • Rename publisher-production to main; the workflow only runs on main.
  • Delete the stale cloudplat-3162/add-npm-oidc-publish branch.
  • Update branch protection.
  • The first push to main deploys the demo to both labs sites. It publishes to npm only if a fix: or feat: commit came in.

@jcary741
jcary741 requested a review from tristen October 20, 2026 17:48

on:
push:
branches: ['main']

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be publisher-production? main does not exist unless you are intended to change this but note we still want to publish builds to that branch

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! That's in the post-merge TODO:

-[ ] Rename publisher-production to main; the workflow only runs on main.

Comment thread .publisher.yml Outdated
@jcary741
jcary741 requested a review from a team as a code owner October 22, 2026 18:40
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