GitHub Actions Rolling Release Workflow
Relevant source files
The following files were used as context for generating this wiki page:
The GitHub Actions Rolling Release Workflow is the automated delivery pipeline for Trans AI, an artificial intelligence opponent for OpenTTD. This system has transitioned the project from manual, script-based builds to a fully automated Continuous Integration and Continuous Deployment (CI/CD) model. The primary goal of this workflow is to provide users with the most recent development builds without requiring manual intervention from the maintainers.
This workflow implements a "rolling release" strategy, ensuring that the latest stable and development versions are consistently available. It handles the packaging of source code into a format compatible with OpenTTD (.tar files) and manages the distribution through GitHub Releases and the official OpenTTD content service, 'Bananas'.
Sources: README.md:68-71, README.md:12-14
Release Model and Versioning
The project utilizes a date-based versioning scheme to support its rolling release nature. This ensures that every update is unique and chronological, allowing OpenTTD and players to easily identify the "freshness" of a build.
Versioning Format
The version number is derived from the commit date using the YYMMDD format (e.g., 250610). Under this model:
- Daily Updates: Only one release is typically maintained per day.
- Subsequent Pushes: If multiple pushes occur on the same day, the workflow updates the existing daily release with the latest changes rather than creating multiple versions for the same date.
- Local Development: For developers cloning the repository, the version in the local
info.nutfile is set to a distant future date. This prevents OpenTTD from overwriting local modifications with official releases.
Sources: README.md:58-64
Distribution Channels
The automated workflow targets two primary distribution channels:
| Channel | Purpose | Identification |
|---|---|---|
| GitHub Releases | Provides the latest development builds and historical archives. | Marked with date tags (e.g., 250610). |
| OpenTTD 'Bananas' | Official in-game content service for stable players. | Triggered by the bananas tag. |
| Sources: README.md:21-35, README.md:65-66 |
Automation Architecture
The build process is defined in the .github/workflows/rolling-release.yml file. It orchestrates the transition from source code to a distributable OpenTTD AI package.
The workflow manages the transition from manual script-based builds to fully automated GitHub Actions.
Sources: README.md:68-71, README.md:58-62
Installation and Dependency Management
The workflow ensures that the generated artifacts are ready for the standard OpenTTD installation paths. The AI requires specific libraries to be present in the user's environment to function correctly.
Required Dependencies
The automated build assumes the existence of the following libraries in the ../ai/library directory:
- AI Library - Common: Version 2
- AI Library - List: Version 3
- AI Library - String: Version 2
Sources: README.md:46-55
Artifact Handling
The workflow packages the AI into a .tar file. Users installing from GitHub Releases are instructed to place the Trans-AI-[version].tar file directly into their OpenTTD ai directory without extraction. This behavior is supported by the internal structure defined during the automated build process.
Sources: README.md:26-30
Implementation Status
The rolling release workflow supports all features currently implemented in the AI, including transport logic for buses, trucks, trams, aircraft, ships, and rail. As new features (like CargoDist support or chopper services) are merged into the main branch, the GitHub Actions workflow automatically incorporates them into the next rolling release.
Sources: ROADMAP.md:4-48, README.md:12-14
Summary
The GitHub Actions Rolling Release Workflow provides a robust, hands-off mechanism for deploying Trans AI. By leveraging date-based versioning and automated GitHub Actions, the project maintains a high velocity of updates while ensuring that both developers and players have access to the most recent improvements in cargo transportation logic and infrastructure maintenance.
Sources: README.md:58-71