feat(release): let publish-store take a lane's binary from a release - #104
Merged
Merged
Conversation
publish-store.yml hands a lane what `artifacts` downloads, and download-artifact only sees the current run. A promotion tier builds nothing, so a store with no promote endpoint - Huawei AppGallery, which re-uploads the bundle on every tier - had nothing to read. The template answers with an extra job in each of its beta and production callers: download the .aab off the release tag, upload it as an artifact, and point the lane at every artifact. Two inputs replace that job. `release-assets` is a glob of assets to download from the `release-tag` release into the same directory as `artifacts`, after them, so the lane finds the file the same way. No tag, or no matching asset, is fatal: a lane run without its binary uploads nothing.
…sets # Conflicts: # README.md
…sets # Conflicts: # README.md # test/workflow-shape.bats
…sets # Conflicts: # README.md
…sets # Conflicts: # README.md
…sets # Conflicts: # README.md
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.
What and why
publish-store.ymlhands a lane whateverartifactsdownloads, anddownload-artifactonly sees the current run. A promotion tier builds nothing. So a store with no promote endpoint, like Huawei AppGallery, which re-uploads the bundle on every tier, has nothing to read.The template answers with an extra
huawei-binaryjob, identical in its beta and production callers. The job runsgh release download "$TAG" --pattern '*.aab', uploads the result as an artifact, and points the lane at every artifact (artifacts: "*").Two inputs replace that job:
release-assets: a glob of assets to download from therelease-tagrelease into the same$WORKFLOWS_ASSETS_DIRasartifacts, after them, so the lane finds the file the same way.release-tag: the release they come from; required whenrelease-assetsis set.scripts/release/release-assets-fetch.sh(new) does the download.die_fix, linking the guide).gh's own reason: a lane run without its binary uploads nothing.Not breaking: two new inputs that default to empty, and a step that only runs when
release-assetsis set.How to verify
make checkpasses: exit 0.test/release-assets-fetch.bats(new, 6 cases):gharguments are checked;artifacts) are left alone and not reported;ghcall;gh's reason;test/workflow-shape.bats, new case: both inputs default to empty, and the step:release-assets;$WORKFLOWS_ASSETS_DIR;test/consumer-contract.bats: both inputs are documented in the guide'spublish-store.ymltable.Docs
docs/consumer-guide.md:release-assetsandrelease-tagrows in thepublish-store.ymltable, with the AppGallery example.README.md: the script, shell-script, bats-file and test counts.The template drops both
huawei-binaryjobs, passingrelease-assets: '*.aab'andrelease-tagto its Huawei calls, after it moves its pin to the release carrying this.Checklist
make checkpasses locallytest/release-assets-fetch.bats,test/workflow-shape.bats)docs/consumer-guide.mdupdated: two new inputs