This page serves as a checklist of what to do when releasing a new SDK for the first time.
This checklist was written while working on the @sentry/svelte Alpha 1 release. Some parts in this checklist might differ slightly for other SDKs depending on how they are structured and how they work
-
Make sure, the project is set up completely
- The package exports the necessary modules
- The package has a working unit testing environment
- The package builds correctly (inspect
<package>/builddirectory)
-
Make sure that the
README.mdcontent is up to date and contains at least:- The correct name + a brief description of the SDK
- Badges pointing to the correct (yet not existing) NPM package (this isn’t deadly necessary but nice to have)
- If the SDK is not yet stable, a clear message indicating that it is in alpha/beta state and that breaking changes can still occur
- A brief description how to set up and configure the SDK. If you already have docs, add a link to the docs, otherwise link to the “parent” SDK docs (e.g.
@sentry/browser) if applicable - Extra information (e.g. how to upload sourcemaps)
-
Make sure that the
LICENSEfile exists and has the correct license (We default to theMITlicense)- Also check, that the same license is mentioned in
package.json
- Also check, that the same license is mentioned in
-
Make sure that the tarball (
yarn build:tarball) has all the necessary contentsFor basic SDKs, this means that the tarball has at least these files:
-
cjs/<entrypoint>.js -
esm/<entrypoint>.js -
types/<entrypoint.d.ts> -
package.json- Entry points registered in this file match the file structure above
-
LICENSE -
README.md - If your tarball should contain additional files outside
esm,cjs, andtypesthat are not listed above (e.g. like Gatsby or Remix), be sure to add a package-specificprepack.tsscript. In this script, you can copy these additional files and make other adjustments.
Check out the Gatsby script as an example.
It’s recommended to build and pack a tarball and thenyarn add path/to/tarball.tar.gzit to your test app(s) to ensure that it has all the correct files.
-
-
Make sure
build.ymlCI script is correctly set up to cover tests for the new package- Ensure dependent packages are correctly set for “Determine changed packages”
- Ensure unit tests run correctly
-
Make sure the file paths in the "Upload Artifacts" job in
build.ymlinclude your new artifacts.- This is especially important, if you're adding new CDN bundles!
- Tarballs (*.tgz archives) should work OOTB
When you’re ready to make the first release, there are a couple of steps that need to be performed in the correct order. Note that you can prepare the PRs at any time but the merging oder is important:
All of these steps should happen when you’re committed to releasing the SDK in the next upcoming release.
- 1) If not yet done, be sure to remove the
private: trueproperty from your SDK’spackage.json. Additionally, ensure that"publishConfig": {"access": "public"}is set. - 2) Make sure that the new SDK is not added in
[craft.yml](https://github.com/getsentry/sentry-javascript/blob/master/.craft.yml)as a target for the Sentry release registry
Once this is added, craft will try to publish an entry in the next release which does not work and caused failed release runs in the past - 3) Make sure the new SDK is not excluded from the github & npm targets in
.craft.yml - 4) Cut a new release (as usual, via GH release action and Craft)
-
4) Check that the package was in fact published to NPM
-
5) Add the new SDK to the Sentry Release Registry
Instructions on how to do this can be found here
You have to fork this repo and PR the files from your fork to the main repo
Example PR from the Svelte SDK -
2) Add an entry to
[craft.yml](https://github.com/getsentry/sentry-javascript/blob/master/.craft.yml)to add releases of your SDK to the Sentry release registry
Example PR from the Svelte SDK
Subsequent releases will now be added automatically to the registry
- Monitor GH for incoming bug reports/feature requests/praises/thank you messages/marriage proposals and potatoes
- Feel good about yourself 😎