This document explains how to configure and use this release repository.
- Access to the private repository
leaperone/MultiPost-Desktop - GitHub Personal Access Token (PAT) with appropriate permissions
- Go to GitHub Settings > Developer settings > Personal access tokens > Fine-grained tokens
- Click "Generate new token"
- Configure the token:
- Token name:
MultiPost-Desktop-Release - Expiration: Choose an appropriate duration
- Repository access: Select "Only select repositories" and choose
leaperone/MultiPost-Desktop - Permissions:
- Contents: Read-only
- Metadata: Read-only
- Token name:
- Generate and copy the token
Go to this repository's Settings > Secrets and variables > Actions, and add:
| Secret Name | Description |
|---|---|
PRIVATE_REPO_PAT |
The Personal Access Token created above |
For proper macOS builds with code signing and notarization, add these secrets:
| Secret Name | Description |
|---|---|
CSC_LINK |
Base64-encoded .p12 certificate file |
CSC_KEY_PASSWORD |
Password for the .p12 certificate |
APPLE_ID |
Apple Developer account email |
APPLE_APP_SPECIFIC_PASSWORD |
App-specific password for notarization |
APPLE_TEAM_ID |
Apple Developer Team ID |
To generate CSC_LINK:
base64 -i certificate.p12 | pbcopyFor Windows EV code signing:
| Secret Name | Description |
|---|---|
WIN_CSC_LINK |
Base64-encoded Windows certificate |
WIN_CSC_KEY_PASSWORD |
Certificate password |
- Go to Actions tab
- Select "Build and Release" workflow
- Click "Run workflow"
- Enter the version tag (e.g.,
v1.0.0) - Choose whether it's a pre-release
- Click "Run workflow"
Trigger a build from the private repository using the GitHub API:
curl -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer YOUR_PAT" \
https://api.github.com/repos/leaperone/MultiPost-Desktop-Release/dispatches \
-d '{
"event_type": "release-build",
"client_payload": {
"version": "v1.0.0",
"ref": "main",
"prerelease": false,
"body": "Release notes here..."
}
}'Add this script to the private repository:
#!/bin/bash
# scripts/trigger-release.sh
VERSION=$1
REF=${2:-main}
PRERELEASE=${3:-false}
if [ -z "$VERSION" ]; then
echo "Usage: ./trigger-release.sh <version> [ref] [prerelease]"
echo "Example: ./trigger-release.sh v1.0.0 main false"
exit 1
fi
curl -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
https://api.github.com/repos/leaperone/MultiPost-Desktop-Release/dispatches \
-d "{
\"event_type\": \"release-build\",
\"client_payload\": {
\"version\": \"$VERSION\",
\"ref\": \"$REF\",
\"prerelease\": $PRERELEASE
}
}"
echo "Release build triggered for $VERSION"| File | Purpose |
|---|---|
build-release.yml |
Manual trigger workflow with version input |
build-on-tag.yml |
API-triggered workflow via repository_dispatch |
- Ensure
PRIVATE_REPO_PATsecret is set correctly - Verify the PAT has read access to the private repository
- Check that code signing secrets are properly configured
- For unsigned builds, the current configuration should work without signing
- Snapcraft might require additional configuration
- Consider removing
.snapfrom the build if not needed
- The PAT should have minimal required permissions
- Rotate the PAT periodically
- Never commit secrets to the repository