rslib-starter
December 14, 2024 ยท View on GitHub
A starter template for developing React components with rslib, featuring automated versioning and publishing using semantic-release.
Features
- ๐ฆ Built with rslib
- ๐ Automated releases with semantic-release
- ๐ฏ TypeScript support
- ๐ Automated changelog generation
- ๐ GitHub Actions workflow for CI/CD
- ๐ GitHub Pages for documentation
Getting Started
Setting up tokens
This template uses GitHub Actions for automated releases. You'll need to set up the following tokens:
1. GitHub Token (GH_TOKEN)
- Github Personal Access Token
- Click
Generate new token - Generate a new token with the following permissions:
- Actions - read and write
- Commit statuses - read and write
- Contents - read and write
- Deployments - read and write
- Issues - read and write
- Copy the token and add it to your repository's secrets:
- Go to your repository settings
- Navigate to Secrets and variables > Actions
- Create a new secret named
GH_TOKEN
2. NPM Token (NPM_TOKEN)
- Go to npmjs.com
- Navigate to your profile settings
- Select "Access Tokens"
- Create a new access token (Publish)
- Copy the token and add it to your repository's secrets:
- Go to your repository settings
- Navigate to Secrets and variables > Actions
- Create a new secret named
NPM_TOKEN
3. Open GitHub Actions
- Go to your repository Settings Click Pages
- Build and deployment sorce: GitHub Actions
Release Process
This template uses semantic-release for automated versioning and publishing. The release process is triggered automatically when changes are pushed to the main branch.
Commit messages should follow the Conventional Commits specification:
feat: ...- New feature (minor release)fix: ...- Bug fix (patch release)BREAKING CHANGE: ...- Breaking change (major release)