Centralized GitHub Action workflows for releasing Rust crates across GoPlasmatic repositories.
This repository provides a reusable workflow system for automated releases, ensuring consistent quality checks and deployment procedures across all Plasmatic Rust projects.
.github/workflows/
├── rust-release-reusable.yml # Core reusable workflow (all logic here)
├── release-*.yml # Simple triggers for each repository
└── triggers/
└── release-all.yml # Bulk release multiple projects
templates/
├── library-release-caller.yml # Template for library repos
└── application-release-caller.yml # Template for application repos
Navigate to Actions tab → Select workflow → Run workflow
Available workflows:
Release SwiftMTMessage
Release MXMessage
Release dataflow-rs
Release datalogic-rs
Release datafake-rs
Release Reframe
Release Multiple Projects
(bulk releases)Release Workspace Packages
(ordered workspace releases)
Copy the appropriate template to target repo's .github/workflows/release.yml
:
- Libraries: Use
templates/library-release-caller.yml
- Applications: Use
templates/application-release-caller.yml
jobs:
release:
uses: GoPlasmatic/devops/.github/workflows/rust-release-reusable.yml@main
with:
repository: GoPlasmatic/your-repo
package-type: library # or application
skip-publish: false # Set to true for apps not published to crates.io
dry-run: false
secrets:
GH_PAT: ${{ secrets.GH_PAT }}
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} # Not needed if skip-publish: true
✅ Automated Quality Checks
- Code formatting (
cargo fmt
) - Linting (
cargo clippy
) - Test execution (
cargo test
)
✅ Smart Package Detection
- Handles both single packages and workspaces
- Automatically selects publishable packages
- Supports binary and library detection
✅ Release Management
- Version conflict detection
- Automatic git tagging
- GitHub release creation
- crates.io publishing (libraries)
- Binary packaging (applications)
✅ Safety Features
- Dry run mode for testing
- Duplicate version prevention
- Cross-repository operation support
Configure as organization-level secrets:
CRATES_IO_TOKEN
- For publishing to crates.ioGH_PAT
- Personal Access Token withrepo
scope- Required for pushing tags and creating releases
- Create at: Settings → Developer settings → Personal access tokens
- SwiftMTMessage - SWIFT MT message parsing
- MXMessage - MX message handling
- dataflow-rs - Data flow processing
- datalogic-rs - Data logic implementation
- datafake-rs - Fake data generation
- Reframe - Binary application (GitHub releases only, not published to crates.io)
For projects with multiple packages that depend on each other (like swift-mt-message
and swift-mt-message-macros
), use the Release Workspace Packages workflow:
- Specify the repository
- List packages in dependency order (e.g.,
swift-mt-message-macros,swift-mt-message
) - The workflow will:
- Publish packages in the specified order
- Wait for crates.io indexing between publishes
- Create a tag for the final package version
The reusable workflow (rust-release-reusable.yml
) handles:
- Repository checkout with PAT authentication
- Rust toolchain setup with latest stable
- Dependency caching for faster builds
- Code quality checks (format, lint, test)
- Package detection (workspace-aware)
- Version validation against crates.io
- Git tag creation and pushing
- GitHub release with documentation
- Publishing to crates.io or binary packaging
- Status reporting with clear output
Apache License 2.0