-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix publishing workflow and update scripts for web packages #768
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| node_modules/ | ||
| dist/ | ||
| .wireit/ | ||
| .npmrc |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,75 @@ | ||||||
| # Publishing Guide | ||||||
|
|
||||||
| This guide details the process for manually publishing `@a2ui/web_core` to npm. It is intended for project maintainers and is deliberately kept separate from the main `README.md` to ensure these internal instructions are not published as part of the package. | ||||||
|
|
||||||
| ## 1. Prerequisites | ||||||
|
|
||||||
| Before publishing, ensure you have an **NPM Access Token** with publishing rights for the `@a2ui` organization or package. | ||||||
|
|
||||||
| ### Setting up `.npmrc` | ||||||
|
|
||||||
| We use a local `.npmrc` file (or environment variables) for providing credentials without committing them to the repository. | ||||||
|
|
||||||
| 1. Create an `.npmrc` file in the root of `web_core` (it is ignored by Git): | ||||||
| ```sh | ||||||
| //registry.npmjs.org/:_authToken=${NPM_TOKEN} | ||||||
| ``` | ||||||
| 2. Set the `NPM_TOKEN` environment variable in your terminal session with your actual token: | ||||||
| ```sh | ||||||
| export NPM_TOKEN="npm_YourSecretTokenHere" | ||||||
| ``` | ||||||
|
|
||||||
| *Alternative:* You can also directly replace `${NPM_TOKEN}` in the `.npmrc` file with your token, but using environment variables is the safest approach. | ||||||
|
|
||||||
| ## 2. Pre-flight Checks | ||||||
|
|
||||||
| Ensure your local repository is clean and on the correct branch (e.g., `main`). | ||||||
|
|
||||||
| 1. **Check Version:** Ensure the `version` in `package.json` is set correctly. For the current release, it should be `"0.8.0"`. | ||||||
|
||||||
| 1. **Check Version:** Ensure the `version` in `package.json` is set correctly. For the current release, it should be `"0.8.0"`. | |
| 1. **Check Version:** Ensure the `version` in `package.json` is set to the correct version for the release. |
Outdated
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.
Similar to the version check, this hardcoded version in the git tag example will become outdated. Using a generic placeholder or a non-specific example is more maintainable and less prone to causing confusion for future releases.
| 1. Create a git tag for the release (e.g., `git tag v0.8.0`). | |
| 1. Create a git tag for the release (e.g., `git tag v1.2.3`). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # @a2ui/web_core | ||
|
|
||
| This is the Core Library for A2UI web renderers. | ||
|
|
||
| ## Installation | ||
|
|
||
| ```sh | ||
| npm install @a2ui/web_core | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| Please refer to the A2UI documentation for usage instructions. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "name": "@a2ui/web_core", | ||
| "version": "0.8.2", | ||
| "version": "0.8.0", | ||
|
||
| "description": "A2UI Core Library", | ||
| "main": "./dist/src/v0_8/index.js", | ||
| "types": "./dist/src/v0_8/index.d.ts", | ||
|
|
@@ -31,6 +31,10 @@ | |
| }, | ||
| "type": "module", | ||
| "sideEffects": false, | ||
| "files": [ | ||
| "dist", | ||
| "src" | ||
| ], | ||
| "scripts": { | ||
| "prepack": "npm run build", | ||
| "build": "wireit", | ||
|
|
||
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.
Can't wait to deprecate this flow :P