Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a refactor of the GitHub Actions workflows to streamline the build and deployment process across different distribution channels (stable, preview, and rc).
Rationale:
Key Changes:
Workflow Generation Overhaul:
Replaced build.yml with dynamically generated workflows (stable.yml, preview.yml, and rc.yml) based on the new _templates/distribution-channel.yml.erb template.
This change allows more consistent management of distribution channels, reducing duplication and manual edits.
Template Update:
The build.yml.erb template is renamed to distribution-channel.yml.erb to reflect its expanded responsibility of handling multiple channels.
Logic within the template supports distribution-specific postfixes (-preview, -rc), aligning with Snyk CLI release channels.
Ruby Build Script Update (build.rb):
The build script now dynamically generates workflows for each distribution channel by iterating over a distribution_map.
Ensures consistent workflow creation, reducing human error and automating workflow generation for new channels.
Generated Workflow Changes:
preview.yml and rc.yml are added, mirroring the existing stable.yml but adapted for the respective distribution channels.
stable.yml replaces the previous build.yml, maintaining parity with prior stable builds.
Testing: