This document contains instructions for setting up GitHub Actions secrets and configuration for the TabAgent build and deployment workflow.
Purpose: Private key used to sign the Chrome extension (.crx file)
How to add:
- Go to your GitHub repository settings
- Navigate to Settings → Secrets and variables → Actions
- Click New repository secret
- Name:
EXTENSION_PEM - Value: Copy the entire contents of
BKP/Extension.pem.backupincluding the header and footer:
-----BEGIN PRIVATE KEY-----
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDQb44X1ZvwpqQT
...
(full key contents)
...
JlHb+sA+izdmW4xviC11Qw==
-----END PRIVATE KEY-----
- Click Add secret
Security Note:
⚠️ Never commit this PEM file to git⚠️ KeepBKP/Extension.pem.backupsecure and backed up⚠️ This key is already in.gitignoreas*.pem
Purpose: Personal Access Token (PAT) with write access to the TabAgentDist repository
How to create:
- Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
- Click Generate new token (classic)
- Name:
TabAgent CI/CD - Expiration: Choose appropriate duration (recommend 1 year)
- Scopes:
- ✅
repo(Full control of private repositories) - ✅
workflow(Update GitHub Action workflows)
- ✅
- Click Generate token
- IMPORTANT: Copy the token immediately (you won't see it again!)
How to add to repository:
- Go to TabAgent repository settings
- Navigate to Settings → Secrets and variables → Actions
- Click New repository secret
- Name:
TABAGENT_DIST_TOKEN - Value: Paste the PAT you just created
- Click Add secret
The workflow (build-and-deploy.yml) runs on:
on:
push:
branches: [ master ]What it does:
- Builds extension
- Creates signed CRX
- Builds native host binaries (Windows, macOS, Linux)
- Deploys to TabAgentDist repository
- Updates submodule reference
on:
workflow_dispatch:
inputs:
bitnet_version:
description: 'BitNet build version'
default: 'latest'How to trigger:
- Go to Actions tab
- Select Build and Deploy Everything
- Click Run workflow
- Choose branch and BitNet version
- Click Run workflow
on:
repository_dispatch:
types: [bitnet_release]Automatically triggered when BitNet repository creates a new release.
- Checks out code with submodules
- Builds extension →
TabAgentDist/Extension/ - Creates signed CRX →
TabAgentDist/Extension.crx - Uploads artifacts
- Downloads latest or specified BitNet release
- Contains CPU and GPU binaries
- Windows: PyInstaller →
.exe - macOS: PyInstaller → binary
- Linux: PyInstaller → binary
- Output:
TabAgentDist/NativeApp/binaries/{platform}/
- Creates platform-specific installers
- Zips extension for distribution
- Downloads all artifacts
- Copies to
TabAgentDistsubmodule - Commits and pushes to TabAgentDist repo
- Updates main repo's submodule reference
- Triggered when tag
v*is pushed - Creates release in TabAgentDist repo
- Attaches extension ZIP
- Go to Settings → Secrets and variables → Actions
- Verify both secrets exist:
- ✅
EXTENSION_PEM - ✅
TABAGENT_DIST_TOKEN
- ✅
- Make a small change to code
- Commit and push to a test branch
- Manually trigger workflow via Actions tab
- Check workflow logs for:
- ✅ Submodules initialized
- ✅ Extension built
- ✅ CRX created
- ✅ Binaries built
- ✅ Deploy succeeded
Cause: EXTENSION_PEM secret not set or invalid
Fix:
- Verify secret exists and contains valid PEM key
- Check workflow logs for
crx3errors
Cause: TABAGENT_DIST_TOKEN missing or insufficient permissions
Fix:
- Regenerate PAT with
repoandworkflowscopes - Update secret
Cause: Workflow checkout missing submodules: 'recursive'
Fix: Already fixed in current workflow (all jobs now checkout submodules)
Cause: Platform-specific dependencies or build tool issues
Fix:
- Check platform-specific job logs
- Verify
Server/build-tool/scripts are correct - Test locally on that platform
- Update version in
manifest.jsonandpackage.json - Commit changes to
master - Create and push tag:
git tag -a v1.0.0 -m "Release v1.0.0" git push origin v1.0.0 - Workflow automatically:
- Builds everything
- Deploys to TabAgentDist
- Creates GitHub release with installers
- Attaches extension ZIP
- Version updated in
manifest.json - Version updated in
package.json - Changelog updated (if you maintain one)
- Tag created and pushed
- Workflow completed successfully
- Release appears in TabAgentDist repo
- Extension and installers available for download
-
Never commit secrets to git
- PEM keys
- Access tokens
- API keys
-
Rotate tokens regularly
- Update
TABAGENT_DIST_TOKENannually - Regenerate if compromised
- Update
-
Limit token scope
- Only grant necessary permissions
- Use repository-scoped tokens when possible
-
Monitor workflow logs
- Check for exposed secrets (GitHub auto-redacts, but verify)
- Review failed builds for security issues
-
Protect branches
- Enable branch protection for
master - Require pull request reviews
- Require status checks to pass
- Enable branch protection for