-
Notifications
You must be signed in to change notification settings - Fork 2
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
DE-6746: Add a GH workflow to publish a release #18
Conversation
002c1bb
to
8ef14d1
Compare
73e6cc7
to
2dd49bf
Compare
Add a GitHub workflow which publishes the package to NPM and API docs to `https://players.castlabs.com/react-dom/<version>/docs/` when a new Release is manually created on GitHub. The version is taken from the tag created with the Release on GitHub. Beta versions are also supported. Also clean up the readme and the docs homepage.
2dd49bf
to
f575c8f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had some minor comments but i think we need to carefully double check our usage of the NPM token. I would like to have it as part of an environment that is linked to a protected branch. Not sure if we can do this with the current structure though.
This NPM feature requires upgrade to at least node 18, but GitHub actions don't support node 18 so I'm upgrading to 20.
@thasso I've also added provenance verification and switched to a granular NPM token. Provenance works, I've tested it with a beta NPM release, just an interesting note on that topic: it needs Node.js version 20 (actually version 18 would be enough, but GitHub actions somehow don't support it, at least not explicitly, so version 20 it is 😄). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, just one more suggestion on how we expose the token that you might want to give a shot.
Here I'm adding a GitHub workflow to publish a new version to NPM and deploy API docs for that version to https://players.castlabs.com/react-dom/x.x.x/docs/. It gets triggered when we create a new Release in GitHub (when creating the release, select "Create new tag" and specify the target version).
Beta versions are also supported and they will be published accordingly to a NPM beta channel (non-main channel).