This document outlines the required configuration for CI/CD workflows in the openzeppelin-ui repository.
The publish workflow requires three secrets to be configured in the GitHub repository settings.
The release workflow uses a GitHub App to create release PRs and push version bumps.
- Type: Repository variable (not secret)
- Location: Settings > Secrets and variables > Actions > Variables
- Description: The App ID of the GitHub App used for automation
- How to obtain: GitHub App settings page > App ID field
- Type: Repository secret
- Location: Settings > Secrets and variables > Actions > Secrets
- Description: The private key for the GitHub App
- How to obtain: GitHub App settings > Generate a private key
- Format: Full PEM file contents including
-----BEGIN RSA PRIVATE KEY-----headers
- Type: Repository secret
- Location: Settings > Secrets and variables > Actions > Secrets
- Description: Access token for publishing to npm registry
- Required scope:
publishaccess for@openzeppelinorganization - How to obtain: npm.js > Access Tokens > Generate New Token > Granular Access Token
The GitHub App needs the following permissions:
| Permission | Access | Purpose |
|---|---|---|
| Contents | Read/Write | Push version bumps, create tags |
| Pull requests | Read/Write | Create release PRs |
| Metadata | Read | Basic repository access |
| Actions | Read/Write | Trigger workflows |
The GitHub App must be installed on the OpenZeppelin/openzeppelin-ui repository.
The npm token must have:
- Automation token type (for CI/CD)
- Publish permission for the
@openzeppelinorganization - No 2FA requirement (automation tokens bypass 2FA)
After configuring secrets, verify the setup:
-
Test GitHub App token generation:
- Trigger the publish workflow manually
- Check that the "Checkout Repo" step succeeds with the app token
-
Test npm authentication:
- The first publish attempt will verify npm token validity
- Check workflow logs for authentication errors
Once secrets are configured:
- Merge any pending changes to
main - The publish workflow will automatically:
- Generate SLSA Level 3 provenance
- Publish all 7 packages at version 1.0.0
- Create GitHub releases for each package
- Ensure the GitHub App is installed on this repository
- Verify the App has the required permissions
- Verify the NPM_TOKEN has publish access to
@openzeppelin - Check token hasn't expired
- Ensure GH_APP_ID is set as a variable (not a secret)
- Verify the App ID is correct
- Never commit tokens or keys to the repository
- Rotate tokens periodically
- Use the principle of least privilege for token scopes
- Consider separate tokens for staging vs production (future)