Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy to npm on a new Git tag #2

Merged
merged 1 commit into from
Mar 25, 2025
Merged

Deploy to npm on a new Git tag #2

merged 1 commit into from
Mar 25, 2025

Conversation

notpushkin
Copy link
Collaborator

@notpushkin notpushkin commented Mar 20, 2025

I’ve set up a simple GitHub Actions workflow that will release a new version on npm for every Git tag. In future, we might also want to add some tests, but for now I think this should be enough.


@tonypconway I can’t seem to set Action secrets in the settings – at least admin access is needed. Could you perhaps bump my role? https://github.com/A-Edge/landing/settings/access

Alternatively, you can set it up yourself like this:

  1. Go to https://www.npmjs.com/settings/tonypconway/tokens/granular-access-tokens/new
  2. Set up a token name, some reasonable expiration date
  3. Under Packages and scopesPermissions select Read and write, then Only select packages and scopesbrowserslist-config-baseline
  4. Go to https://github.com/web-platform-dx/browserslist-config-baseline/settings/secrets/actions/new
  5. Set Name to NPM_CONFIG_TOKEN and Secret to the token you just got

@notpushkin notpushkin requested a review from tonypconway March 20, 2025 10:31
@tonypconway
Copy link
Collaborator

@notpushkin this LGTM as a starting point. Just so I understand - this will run any time there's a push to main?

I've elevated you to Admin privileges, so you should be able to add the token yourself 👍

@notpushkin
Copy link
Collaborator Author

this will run any time there's a push to main?

Nope, only when there are new tags – so, to release a new version, you just create a new tag (from command line via git tag v0.0.0 && git push origin --tags, or through GitHub releases).

@tonypconway
Copy link
Collaborator

This LGTM, merging now to assist with testing Widely Available auto-update/publish in #4

@tonypconway tonypconway merged commit 6e27605 into main Mar 25, 2025
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