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

Update / modernize publishing docs. #173

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions PUBLISHING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

We use GitHub actions to publish new versions of this repository. To publish, perform the following actions:

1. Checkout the `main` branch and `pull` to ensure your local branch is current — `git checkout main && git pull origin main`
2. Run `npm version` and select the next version number (being careful to differentiate between releases and release candidates) — `npm version`
3. Push the resulting commit to the origin's `main` branch — `git push origin main`
4. Push the resulting tags to origin — `git push origin --tags`
5. In the GitHub UI, find [the tag you just pushed](https://github.com/Netflix/x-element/tags) and find the "Create release" option.
6. Add any additional release information (including to check the box if it's a "pre-release", it probably is!).
1. Ensure your local `main` branch is checked-out and current — `git checkout main && git pull origin main`.
2. Run `npm version` to view the current version. Then…
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Surprise! The functionality of npm version has changed in the latest version. Sort of surprising, but not a huge deal. It used to prompt you for a version after running, now, you have to pass the versioning information up-front. Sorta sensible, but caught me off guard earlier.

* **For Normal Releases** use a keyword like `major`, `minor`, or `patch` (e.g., `npm version patch`).
* **For Release Candidates** manually declare the next version (e.g., `npm version 1.0.0-rc.57`).
3. Push the resulting commit and tags — `git push origin main --follow-tags`.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

TIL — --follow-tags to do all this in a single command. Neat.

4. In the GitHub UI, find [the tag you just pushed](https://github.com/Netflix/x-element/tags) and find the "Create release" option. Add any additional release information (including to check the box if it's a "pre-release", it probably is!).

By _creating a release_, the "Release" GitHub action will be triggered and if all the tests pass, it'll publish.
By _creating a release_, the "Publish" GitHub action will be triggered and if all the tests pass, itll publish to all the registries we care about.
Loading