-
Notifications
You must be signed in to change notification settings - Fork 4
Add sampo distribute mode for artifact distribution #111
Copy link
Copy link
Open
Labels
P2 - highBugs that violates the documented behavior.Bugs that violates the documented behavior.RFCProposed feature or change - open for feedbackProposed feature or change - open for feedbackcrt:sampoChanges in Sampo CLI crate.Changes in Sampo CLI crate.crt:sampo-coreChanges in Sampo core logic or internal utils.Changes in Sampo core logic or internal utils.crt:sampo-github-actionChanges in Sampo's Github action crate.Changes in Sampo's Github action crate.
Metadata
Metadata
Assignees
Labels
P2 - highBugs that violates the documented behavior.Bugs that violates the documented behavior.RFCProposed feature or change - open for feedbackProposed feature or change - open for feedbackcrt:sampoChanges in Sampo CLI crate.Changes in Sampo CLI crate.crt:sampo-coreChanges in Sampo core logic or internal utils.Changes in Sampo core logic or internal utils.crt:sampo-github-actionChanges in Sampo's Github action crate.Changes in Sampo's Github action crate.
Describe the problem
Our release workflow always builds binaries before we know whether a release actually ships, and once
sampo publishruns we manually move artifacts into GitHub Releases or other channels. Without a single source of truth, every distribution step re-derives which crates changed and where binaries live, duplicating logic that Sampo already knows.What's the proposed behaviour?
Introduce
sampo distribute(accessible viasampo-github-action --mode distribute) as the post-publish phase. It would read the release plan and the tags produced earlier, then:execute user-defined build scripts/commands for each(See BIG LIMITATION below)(crate, target)that needs artifactsThe first backends to implement:
sampo publish.Longer term, additional adapters should cover OS registries (apt, dnf, pacman, Homebrew, AUR, etc.) and artifact repositories (S3, CDN, internal buckets). Sampo remains the SSOT that decides when distribution is required, while adapters encapsulate the API calls or git pushes needed to publish binaries.
Open questions
Using the
sampo releaseoutput from the action'sautooureleasemode. And then thedistributemode take the freshly built artifacts, and distribute them.[distribution]table with per-target entries? Or introcing a general-purposesampo.tomlfor crate-specific configuration? (Could be useful for other features)