Publishing
How to publish your electron-shadcn app
The publish command creates distributables and uploads them to GitHub Releases.
Configure Repository Information
Update forge.config.ts with your repository details:
publishers: [
{
name: "@electron-forge/publisher-github",
config: {
repository: {
owner: "your-username",
name: "your-repository",
},
draft: true,
prerelease: false,
},
},
],Set Up GitHub Token
Create a GitHub Personal Access Token with repo permissions and set it as an environment variable:
$env:GITHUB_TOKEN="your-github-token"
npm run publishexport GITHUB_TOKEN="your-github-token"
npm run publishUpdate Version
Before publishing, update the version in package.json:
{
"version": "1.0.1"
}The version number will be used as the release tag.
Publish
Run the publish command:
npm run publishThis will create a draft release on GitHub with the built artifacts attached.
By default, releases are created as drafts. Review and edit the release description on GitHub before publishing it to users.
Using GitHub Actions
electron-shadcn includes a pre-configured GitHub Actions workflow for automated publishing.
The workflow is located at .github/workflows/publish.yml and can be triggered manually from the Actions tab in your repository.
Workflow Features
- Builds for Windows, macOS, and Linux
- Automatically creates GitHub Releases
- Uploads all platform artifacts
- Creates draft releases for review
Running the Workflow
The publish workflow needs to be triggered manually, this allows you to control when releases are created.
- Go to your repository on GitHub
- Navigate to Actions → Publish Release
- Click Run workflow
- Select the branch and confirm
Build Configuration
The build configuration is managed in forge.config.ts. Here you can customize:
- App metadata: Name, description, icons
- Makers: Configure installers for each platform
- Publishers: Set up release destinations
- Plugins: Vite bundler configuration
Customizing App Icons
TODO: Add instructions for customizing app icons.
Troubleshooting
Code Signing Issues on macOS
For distribution outside the Mac App Store, you need to notarize your app. See the Electron documentation on notarization.