Skip to content

Generate a GitHub token

Create a publishing token

  1. In GitHub, click your profile image and go to Settings.
  2. Go to Developer settings > Personal access tokens > Tokens (classic).
  3. Click Generate new token > Generate new token (classic).
  4. In the Note field, give it a short descriptive name, e.g. Publish components package.
  5. Under Select scopes check write:packages. This should select all the other required scopes automatically.
  6. Click Generate token.
  7. Copy the token and store it in your password manager.
  8. Click Configure SSO and choose MinderooFoundation. Follow the configuration prompts.

Create a consuming token

  1. Follow steps 1-4 above.
  2. Under Select scopes check read:packages.
  3. Click Generate token.
  4. Copy the token and store it in your password manager.
  5. Click Configure SSO and choose MinderooFoundation. Follow the configuration prompts.

Publishing the components package

  1. Make sure you have a minimum node version of 20.x.x.
  2. In gitbash:
cd minderoo-components
npm login --scope=@minderoofoundation --registry=https://npm.pkg.github.com
Username: <your_github_username>
Password: <your_token>
npm publish

Consuming a components package

Locally

In C:\Users\username\.bashrc add the line:

export PACKAGE_TOKEN=<your token>

Amplify

  1. In AWS Amplify, click on the site you are adding the token to.
  2. Go to App settings > Environment variables and click Manage variables.
  3. Update the PACKAGE_TOKEN variable with your consuming token, or if it does not exist, create it.