Release Automation
Technical documentation on the automated release process and info generation.
Overview
The release info integration automatically:
- Validates version consistency across
package.json
,package-lock.json
, andcom.github.IsmaelMartinez.teams_for_linux.appdata.xml
- Extracts release notes from the
com.github.IsmaelMartinez.teams_for_linux.appdata.xml
file - Generates a
release-info.json
file conforming to electron-builder's ReleaseInfo interface - Makes release info available for Linux publishing to GitHub
How It Works
Build Process Integration
- Pre-build: The
prebuild
npm script runsgenerate-release-info
before any build - After Pack: The
afterPack
hook in electron-builder generates fresh release info for Linux builds - Publishing: The
release-info.json
file is referenced by electron-builder'sreleaseNotesFile
setting for Linux publishing to GitHub
Generated Files
release-info.json
(project root): Used for Linux publishing process
Usage
NPM Scripts
# Generate release info manually
npm run generate-release-info
# Build with automatic release info generation
npm run pack
npm run dist
Essential Commands
Quick Reference
npm run generate-release-info
- Generate release information manuallynpm run pack
- Development build with automatic release info generationnpm run dist
- Production build with publishing support
File Structure
project/
├── package.json # Contains version and build config
├── package-lock.json # Version consistency check
├── com.github.IsmaelMartinez.teams_for_linux.appdata.xml # Source of release notes
├── release-info.json # Generated release info (dev)
├── scripts/
│ ├── generateReleaseInfo.js # Release info generator
│ └── afterpack.js # Build hook integration
Configuration
electron-builder Configuration (package.json)
{
"build": {
"linux": {
"publish": {
"provider": "github",
"releaseType": "draft",
"releaseInfo": {
"releaseNotesFile": "release-info.json"
}
}
},
"afterPack": "scripts/afterpack.js"
}
}
NPM Scripts (package.json)
{
"scripts": {
"generate-release-info": "node scripts/generateReleaseInfo.js",
"prebuild": "npm run generate-release-info"
}
}
Release Info Schema
The generated release-info.json
follows electron-builder's ReleaseInfo interface:
{
"releaseName": "2.0.16",
"releaseNotes": "• Added feature A\n• Fixed bug B\n• Improved performance C",
"releaseDate": "2025-06-05"
}
Properties
Property | Source | Description |
---|---|---|
releaseName | package.json | Current version number |
releaseNotes | appdata.xml | Release notes from <description> section |
releaseDate | appdata.xml | Release date from date attribute |
Release Workflow
Adding Release Notes
To add release notes for a new version:
- Update version in
package.json
- Update lock file by running
npm install
to updatepackage-lock.json
- Add release entry in
com.github.IsmaelMartinez.teams_for_linux.appdata.xml
:
<release version="2.0.17" date="2025-06-15">
<description>
<ul>
<li>New feature description</li>
<li>Bug fix description</li>
<li>Performance improvement</li>
</ul>
</description>
</release>
- Build automatically - The release info will be generated during the next build
Release Checklist
- Version updated in
package.json
-
package-lock.json
updated vianpm install
- Release entry added to
appdata.xml
- Release notes describe all significant changes
- Version consistency validated
- Build and test locally before publishing
Error Handling
The system performs validation and provides helpful error messages:
Common Errors
- Version Mismatch: If
package.json
andpackage-lock.json
versions don't match - Missing Release Entry: If no release entry exists for the current version in
appdata.xml
- Empty Release Notes: If the release entry has no description
- Missing Files: If any required file is not found
Troubleshooting Steps
- Check version consistency across all three files
- Validate XML syntax in the appdata file
- Ensure release entry exists for the current version
- Verify file permissions for script execution
Examples
Manual Generation
cd /path/to/teams-for-linux
npm run generate-release-info
Successful Output:
✅ Version consistency check passed!
package.json: 2.0.16
package-lock.json: 2.0.16
com.github.IsmaelMartinez.teams_for_linux.appdata.xml: 2.0.16 (with release notes)
📋 Generated Release Info (electron-builder ReleaseInfo interface):
{
"releaseName": "2.0.16",
"releaseNotes": "• Added a reimplementation of the call events to revive the incoming call scripts\n• Added an incoming call toast just like the one from the discontinued Linux Teams App from Microsoft",
"releaseDate": "2025-06-05"
}
💾 Release info saved to: /path/to/teams-for-linux/release-info.json
Build Integration
npm run pack # Automatically runs prebuild and afterPack hooks
The release info will be automatically generated and bundled with the application.
CI/CD Integration
For automated releases in GitHub Actions:
- name: Generate Release Info
run: npm run generate-release-info
- name: Build Application
run: npm run dist
- name: Publish Release
run: npm run publish
Advanced Configuration
Custom Release Notes Format
You can customize the release notes extraction by modifying the generateReleaseInfo.js
script to:
- Change formatting (HTML to Markdown conversion)
- Add additional metadata
- Include commit information
- Generate changelogs from git history
Multi-Platform Releases
For cross-platform releases, ensure:
- Version consistency across all platforms
- Platform-specific release notes if needed
- Proper artifact naming and organization
Related Documentation
- Configuration Options - Application configuration reference
- IPC API - Integration with application features