Generate a GitHub token
Create a publishing token
- In GitHub, click your profile image and go to Settings.
- Go to Developer settings > Personal access tokens > Tokens (classic).
- Click Generate new token > Generate new token (classic).
- In the Note field, give it a short descriptive name, e.g. Publish components package.
- Under Select scopes check
write:packages. This should select all the other required scopes automatically. - Click Generate token.
- Copy the token and store it in your password manager.
- Click Configure SSO and choose MinderooFoundation. Follow the configuration prompts.
Create a consuming token
- Follow steps 1-4 above.
- Under Select scopes check
read:packages. - Click Generate token.
- Copy the token and store it in your password manager.
- Click Configure SSO and choose MinderooFoundation. Follow the configuration prompts.
Publishing the components package
- Make sure you have a minimum node version of 20.x.x.
- In gitbash:
cd minderoo-componentsnpm login --scope=@minderoofoundation --registry=https://npm.pkg.github.comUsername: <your_github_username>Password: <your_token>npm publishConsuming a components package
Locally
In C:\Users\username\.bashrc add the line:
export PACKAGE_TOKEN=<your token>Amplify
- In AWS Amplify, click on the site you are adding the token to.
- Go to App settings > Environment variables and click Manage variables.
- Update the
PACKAGE_TOKENvariable with your consuming token, or if it does not exist, create it.