Skip to content

Commit e588669

Browse files
committed
fix: remove hardcoded version fallback, fail fast if no version provided
Addresses PR review comments: remove '0.18.1' fallback in both build and release jobs. Version is now passed via env vars and the workflow fails explicitly if no version is supplied via workflow_dispatch or repository_dispatch. Agent-Id: agent-94e7274a-0a18-4a87-abb4-57e6efed6532
1 parent 114d5ef commit e588669

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/bun-compile.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,14 @@ jobs:
4141
uses: oven-sh/setup-bun@v2
4242

4343
- name: Install package
44-
run: bun install @augmentcode/auggie@${{ inputs.version || github.event.client_payload.version || '0.18.1' }}
44+
env:
45+
VERSION: ${{ inputs.version || github.event.client_payload.version }}
46+
run: |
47+
if [ -z "$VERSION" ]; then
48+
echo "::error::No version provided. Supply via workflow_dispatch input or repository_dispatch payload."
49+
exit 1
50+
fi
51+
bun install "@augmentcode/auggie@${VERSION}"
4552
4653
- name: Create entry point
4754
run: |
@@ -72,9 +79,14 @@ jobs:
7279
env:
7380
GH_TOKEN: ${{ github.token }}
7481
GH_REPO: ${{ github.repository }}
82+
VERSION: ${{ inputs.version || github.event.client_payload.version }}
7583
run: |
76-
gh release create "v${{ inputs.version || github.event.client_payload.version || '0.18.1' }}" \
77-
--title "v${{ inputs.version || github.event.client_payload.version || '0.18.1' }}" \
84+
if [ -z "$VERSION" ]; then
85+
echo "::error::No version provided. Cannot create release."
86+
exit 1
87+
fi
88+
gh release create "v${VERSION}" \
89+
--title "v${VERSION}" \
7890
--generate-notes \
7991
artifacts/*
8092

0 commit comments

Comments
 (0)