-
Notifications
You must be signed in to change notification settings - Fork 247
chore: release docs update plus auto publish docs site #5436
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
Merged
caseyisonit
merged 10 commits into
main
from
caseyisonit/realse-docs-update-auto-publish-docs-site
May 6, 2025
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
85ce1c7
chore: correct label for auto updating PRs, auto publish docs site wi…
caseyisonit d3a635f
chore: update release process doc
caseyisonit b387076
chore: pr template fixes
caseyisonit 2d77aaf
chore: fix
caseyisonit 61ef6ca
Merge branch 'main' into caseyisonit/realse-docs-update-auto-publish-…
caseyisonit 2daf45f
Apply suggestions from code review
caseyisonit e48f461
Merge branch 'main' into caseyisonit/realse-docs-update-auto-publish-…
caseyisonit 670b9eb
chore: add auto-update label and docs
caseyisonit 108faf0
Merge branch 'caseyisonit/realse-docs-update-auto-publish-docs-site' …
caseyisonit fc46d68
chore: table of contents fix
caseyisonit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,36 +1,129 @@ | ||
| # Releasing a new version of Spectrum Web Components | ||
| # Releasing a new version of Spectrum Web Components <!-- omit from toc --> | ||
|
|
||
| Users with permissions in the `@spectrum-web-components` organization on NPM can follow the following steps to create and publish a new version. | ||
| Users with permissions in the `@spectrum-web-components` organization on NPM can follow these steps to create and publish a new version. | ||
|
|
||
| 1. Merge all pull requests to be included in the release and wait for the `main` branch to show that it has completed the required CI jobs. | ||
| 2. `git checkout main && git fetch && git pull && git clean -dfX` | ||
| 3. Run `nvm use` assumes a Node Version Manager install, and confirm your on an operable version of Node. | ||
| 4. `yarn install && yarn build` to install all dependencies and build the pre-processed assets for publication. | ||
| 5. `npm whoami` ensure that you are logged in with the user account for the public NPM registry | ||
| 6. `yarn changeset-publish` | ||
| 7. Scan the version summary for any unexpected changes. | ||
| - Changes to the _major_ versions number are likely to point to undesired version numbers. | ||
| - Changes to the _minor_ or _feature_ version number should be confirmed as correct against the changes that have been made since the last release. | ||
| 8. `Y` to confirm. | ||
| 9. Enter one time password for npm. | ||
| 10. After the SWC packages are released, the React Wrapper packages will be generated. This multi-phase approach ensure that the wrapped packages share the same version as the standard packages. | ||
| 11. Scan the version summary for any unexpected changes. | ||
| - The versions _should_ be the same as those that just we applied to their matched SWC packages. | ||
| - Changes to the _major_ versions number are likely to point to undesired version numbers. | ||
| - Changes to the _minor_ or _feature_ version number should be confirmed as correct against the changes that have been made since the last release. | ||
| 12. `Y` to confirm. | ||
| 13. Enter a new one time password for npm. | ||
| - [Prerequisites](#prerequisites) | ||
| - [Main successfully builds](#main-successfully-builds) | ||
| - [The correct version of Node is installed](#the-correct-version-of-node-is-installed) | ||
| - [Using Node Version Manager](#using-node-version-manager) | ||
| - [Manually checking](#manually-checking) | ||
| - [Troubleshooting](#troubleshooting) | ||
| - [Github Token is set up](#github-token-is-set-up) | ||
| - [Generate a Github token](#generate-a-github-token) | ||
| - [Logged in to NPM](#logged-in-to-npm) | ||
| - [NPM 2FA authenticator app](#npm-2fa-authenticator-app) | ||
| - [Releasing to NPM — the good stuff](#releasing-to-npm--the-good-stuff) | ||
| - [Troubleshooting](#troubleshooting-1) | ||
| - [Publishing the documentation site manually](#publishing-the-documentation-site-manually) | ||
| - [From GitHub](#from-github) | ||
| - [From the terminal](#from-the-terminal) | ||
| - [References](#references) | ||
|
|
||
| The docs site will publish automatically if the `#publish` string is included in the commit message and the check suite runs successfully. | ||
| ## Prerequisites | ||
|
|
||
| If publishing fails with an error, check the [list of tags](https://github.com/adobe/spectrum-web-components/tags) to see if new tags have been released for your publishing attempt. If they were, run `yarn changeset-publish` again. | ||
| ### Main successfully builds | ||
|
|
||
| ## Publishing the docs site manually | ||
| Merge all pull requests to be included in the release, and wait for the `main` branch to show that it has completed the required Circle CI jobs. | ||
|
|
||
| Navigate to SWC's [Actions](https://github.com/adobe/spectrum-web-components/actions) and click the `Build & publish site` link under the _Workflows_ heading. | ||
| Check [Circle Ci build for `main`](https://app.circleci.com/pipelines/github/adobe/spectrum-web-components?branch=main) shows a `success` status. 1. If it failed, click `rerun` dropdown and select `rerun from failed`. 2. If it continues to fail, investigate further until you can successfully get the `main` branch building. | ||
|
|
||
| At the top of the table you will see a `Run workflow` dropdown; click that and run it from the `main` branch. | ||
| --- | ||
|
|
||
| [Running manual workflows](https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow), GitHub documentation | ||
| ### The correct version of Node is installed | ||
|
|
||
| This is important to confirm before next step because differing node versions will cause build issues. | ||
|
|
||
| #### Using Node Version Manager | ||
|
|
||
| Run `nvm use` (assumes a Node Version Manager install), and confirm you’re on an operable version of Node. | ||
|
|
||
| #### Manually checking | ||
|
|
||
| 1. Run `node --version` to see what version you have installed | ||
| 2. Check `.nvmrc` for node version requirements. | ||
| 3. If the versions don't match, run `node install [version]` | ||
|
|
||
| #### Troubleshooting | ||
|
|
||
| If you need to install the correct yarn version and/or have issues with `yarn` command not being recognized, run `corepack enabled`. Yarn 4 uses corepack and needs to be enabled to access the commands. | ||
|
|
||
| --- | ||
|
|
||
| ### Github Token is set up | ||
|
|
||
| Check you have a GitHub token set up, run `echo $GITHUB_TOKEN`. | ||
|
|
||
| #### Generate a Github token | ||
|
|
||
| 1. If you do not have one, set it up in [Github settings > Developer settings > Personal access tokens](https://github.com/settings/personal-access-tokens) | ||
| 1. Create a classic token | ||
| - Note: SWC changeset release token | ||
| - Set the expiration to a year or less | ||
| - Scopes: | ||
| - `repo (all)` | ||
| - `read:user` | ||
| 2. Add generated token to `~/.zshrc` with `export GITHUB_TOKEN='token'` | ||
| - Make sure there isn't another export with the same name | ||
| 3. Close your terminal to reset your profile, open terminal back up | ||
|
|
||
| --- | ||
|
|
||
| ### Logged in to NPM | ||
|
|
||
| Run `npm whoami` ensure that you are logged in with the user account for the public NPM registry. | ||
|
|
||
| If not logged in, run `npm login` to sign in to your account. | ||
|
|
||
| --- | ||
|
|
||
| ### NPM 2FA authenticator app | ||
|
|
||
| 1. Go to `Account Settings` on NPM | ||
| 2. Click `Modify 2FA` in the Two-Factor Authentication section | ||
| 3. Follow the instructions to configure the authenticator app (i.e. Google Authenticator) of your choice | ||
| 1. Should be able generate a 6-digit password that updates regularly | ||
|
|
||
| --- | ||
|
|
||
| ## Releasing to NPM — the good stuff | ||
|
|
||
| 1. Run `git checkout main && git fetch && git pull && git clean -dfX` to ensure you are working with the latest code | ||
| 2. Run `yarn install && yarn build` to install all dependencies and build the pre-processed assets for publication. | ||
| 1. Confirm no files were updated or modified | ||
| 3. Scan the version summary for any unexpected changes | ||
| 1. In your IDE search `': major` , `': minor`, `': patch` , based on the results in the order of this search list, the highest level takes precedence | ||
| 1. exclude files: `.changeset/README.md` | ||
| 4. Open your authenticator app to have it ready | ||
| 5. Run`yarn changeset-publish` | ||
| 6. Enter the one-time password from your authenticator for NPM. | ||
| 1. Wait for a fresh password; a stale timer might cause issues. | ||
| 7. After the SWC packages are released, the React Wrapper packages will be generated. | ||
| 1. This multi-phase approach ensures that the wrapped packages share the same version as the standard packages. | ||
| 8. Enter a new one-time password from your authenticator for NPM. | ||
| 9. The `yarn changeset-publish` command will automatically commit the changes to main with a commit message of `chore: release new versions #publish` | ||
| 1. The docs site will publish automatically if the `#publish` string is included in the commit message and the check suite runs successfully. | ||
| 10. Confirm the build on `main` passes | ||
|
|
||
| ### Troubleshooting | ||
|
|
||
| If publishing fails with an error: | ||
|
|
||
| - Check the [list of tags](https://github.com/adobe/spectrum-web-components/tags) to see if new tags have been released for your publishing attempt. | ||
| - If they were, run `yarn changeset-publish` again. | ||
|
|
||
| --- | ||
|
|
||
| ## Publishing the documentation site manually | ||
|
|
||
| ### From GitHub | ||
|
|
||
| 1. Navigate to SWC's [Actions](https://github.com/adobe/spectrum-web-components/actions) and click the `Site publish` workflow. | ||
| 2. At the top of the table, click the `Run workflow` dropdown — Use workflow from `main` branch, and click the `run workflow` button. | ||
|
|
||
| ### From the terminal | ||
|
|
||
| If you have the [GitHub CLI](https://cli.github.com) installed, you can alternatively run `gh workflow run publish.yml --ref main` from the command line. | ||
|
|
||
| ### References | ||
|
|
||
| [Running manual workflows](https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow), GitHub documentation |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.