This solution provides a complete GitHub Actions workflow that automatically updates version information across all download files when a new GeoDa version is released. The workflow is triggered by creating a new tag and creates a pull request with all the necessary changes.
.github/workflows/update-version.yml- Main workflow that uses the local script for version updates
VERSION_UPDATE_README.md- User guide for using the automationVERSION_UPDATE_SOLUTION.md- This comprehensive solution document
scripts/validate-json.js- Validates JSON files after updatesscripts/test-version-update.js- Simulates the update process for testing
The workflow is triggered when a new tag is pushed with the format vX.Y.Z.W (e.g., v1.22.0.20).
- Extract version and date: Parses the tag and generates current date
- Run local script: Executes the
update-version.shscript with version and date - Update files: Script modifies all relevant JSON files with new version information
- Validate changes: Ensures all files are properly formatted
- Create PR: Automatically creates a pull request with all changes
downloadContent.json- Updates description and adds release entrydownloadLinux.json- Updates current version, moves previous to historydownloadMac.json- Updates current version, moves previous to historydownloadWindows.json- Updates current version, moves previous to historydownloadNightly.json- Adds new release entry
- Same updates applied to all language variants
// Before
{
"donation": {
"description": "GeoDa is continuously updated. The most current version is GeoDa 1.22.0.18 with new features."
},
"releaseList": {
"releases": [
{ "date": "7/25/2025", "version": "1.22.0.18" }
]
}
}
// After
{
"donation": {
"description": "GeoDa is continuously updated. The most current version is GeoDa 1.22.0.20 with new features."
},
"releaseList": {
"releases": [
{ "date": "7/31/2025", "version": "1.22.0.20" },
{ "date": "7/25/2025", "version": "1.22.0.18" }
]
}
}// Before
{
"currentVersion": {
"version": "GeoDa 1.22.0.18",
"downloads": [
{
"text": "GeoDa 1.22.0.18 (7/25/2025) for 64-bit Ubuntu Noble 24.04",
"href": "https://github.com/GeoDaCenter/geoda/releases/download/v1.22.0.18/GeoDa-1.22.0-noble.zip"
}
]
},
"previousVersions": []
}
// After
{
"currentVersion": {
"version": "GeoDa 1.22.0.20",
"downloads": [
{
"text": "GeoDa 1.22.0.20 (7/31/2025) for 64-bit Ubuntu Noble 24.04",
"href": "https://github.com/GeoDaCenter/geoda/releases/download/v1.22.0.20/GeoDa-1.22.0-noble.zip"
}
]
},
"previousVersions": [
{
"version": "GeoDa 1.22.0.18",
"downloads": [
{
"text": "GeoDa 1.22.0.18 (7/25/2025) for 64-bit Ubuntu Noble 24.04",
"href": "https://github.com/GeoDaCenter/geoda/releases/download/v1.22.0.18/GeoDa-1.22.0-noble.zip"
}
]
}
]
}// Before
{
"releases": [
{
"date": "7/25/2025",
"version": "GeoDa 1.22.0.18",
"releaseNotes": "https://github.com/GeoDaCenter/geoda/releases/tag/v1.22.0.18"
}
]
}
// After
{
"releases": [
{
"date": "7/31/2025",
"version": "GeoDa 1.22.0.20",
"releaseNotes": "https://github.com/GeoDaCenter/geoda/releases/tag/v1.22.0.20"
},
{
"date": "7/25/2025",
"version": "GeoDa 1.22.0.18",
"releaseNotes": "https://github.com/GeoDaCenter/geoda/releases/tag/v1.22.0.18"
}
]
}git tag v1.22.0.20
git push origin v1.22.0.20- Go to the Actions tab in GitHub
- Watch the "Update Version Information" workflow run
- The action will automatically create a pull request
- Review the generated pull request
- Ensure all changes look correct
- Merge the pull request
node scripts/test-version-update.js 1.22.0.20 7/31/2025node scripts/validate-json.js 1.22.0.20- Node.js: For the update script and validation (included in Ubuntu runner)
- Bash: For the wrapper script (included in Ubuntu runner)
- GitHub Actions: For workflow execution
- Automatic version extraction from git tags
- Date generation in M/D/YYYY format
- JSON validation to ensure file integrity
- Multi-language support for de, es, zh-Hans
- Automatic PR creation with descriptive commit messages
- Error handling and validation
- Validates JSON structure after updates
- Checks for required fields and formats
- Provides clear error messages
- Fails gracefully if files are missing
- Automation: Eliminates manual file editing
- Consistency: Ensures all files are updated uniformly
- Speed: Reduces release time from hours to minutes
- Accuracy: Prevents human errors in version numbers
- Audit Trail: Creates pull requests for review
- Multi-language: Handles all language variants automatically
- Tag format: Must be
v1.22.0.20, not1.22.0.20 - Permissions: Repository needs write access for PR creation
- File structure: Ensure all expected files exist
If the action fails, you can:
- Manually trigger the workflow from GitHub Actions tab
- Run the validation script locally to check files
- Use the test script to verify the logic
Potential improvements:
- Support for different version formats
- Custom date formats
- Additional file types
- Email notifications
- Integration with release notes generation
This solution provides a robust, automated way to handle GeoDa version updates. It reduces manual work, prevents errors, and ensures consistency across all download files and language variants. The workflow is production-ready and includes comprehensive testing and validation.