Skip to content

Commit 7016028

Browse files
authored
fix(ci): download builddeck.tag from release_build step for reliable release handoff (#82)
The release step always got a fresh workspace, so the local builddeck.tag file from release_build was never available. The release step always skipped with 'No tag was created'. Fix: - release_build now re-uploads builddeck.tag (downloaded from tag step) under its own step key, so the artifact is immediately available to downstream steps. - release downloads from --step release_build (the step that just ran) instead of checking a local file. Includes the [[ -s builddeck.tag ]] content guard to prevent empty-version crashes. - Conditional upload: builddeck.tag is only uploaded from release_build if it exists and has content (i.e., a tag was created). 'dev' builds are not uploaded.
1 parent d976c6e commit 7016028

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.buildkite/pipeline.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,18 @@ steps:
104104
sha256sum builddeck | tee builddeck.sha256
105105
buildkite-agent artifact upload "builddeck"
106106
buildkite-agent artifact upload "builddeck.sha256"
107+
# Upload builddeck.tag so the release step can download it from this step
108+
# regardless of which agent it runs on. The tag step also uploads it, but
109+
# having it from release_build ensures immediate availability.
110+
if [[ -s builddeck.tag ]]; then
111+
buildkite-agent artifact upload "builddeck.tag"
112+
fi
107113
108114
- label: ":rocket: GitHub Release"
109115
key: release
110116
depends_on: release_build
111117
command: |
112-
if [[ -s builddeck.tag ]]; then
118+
if buildkite-agent artifact download builddeck.tag . --step release_build 2>/dev/null && [[ -s builddeck.tag ]]; then
113119
VERSION=$(cat builddeck.tag)
114120
echo "Creating GitHub release for ${VERSION}"
115121
.buildkite/release.sh "${VERSION}"

0 commit comments

Comments
 (0)