Repository navigation
Split release into package and publish jobs - #749
Merged
Merged
Conversation
The release workflow builds a module and copies it to storage in one job. Split it in two. The package job builds the frontend and the module files as before, then uploads them as a workflow artifact. The publish job downloads the artifact and copies it to storage. The publish job takes the module path and version from the workflow's inputs and copies exactly that version's `.info`, `.mod`, and `.zip` files and the version list, rather than everything in the output directory. It checks that the latest version is a version from that list before pointing `@latest` at it. The publish job runs in a `release` environment, so its storage settings can live there. It installs the same pinned AWS CLI version directly instead of through an action, and fails if a different version would be used.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🤖 The release workflow builds a module and copies it to storage in a single job. This splits that job in two:
The publish job takes the module path and version from the workflow's inputs, and copies exactly that version's
.info,.mod, and.zipfiles plus the version list, rather than everything in the output directory. It checks that the latest version comes from that list before pointing@latestat it. Destination paths are unchanged.Two smaller changes come with it. The publish job runs in a
releaseenvironment, so its storage settings can live there. It also installs the same pinned AWS CLI version directly instead of through an action, and fails if a different version would be used.Since a release can't be rehearsed against real storage, I ran both jobs on a test branch for each module with placeholder credentials and every copy in dry-run mode. Both jobs passed, the copies resolved to the same paths the workflow writes today, and the packaged files from the runner had the same contents and module hash as a local build of the same commit.