Skip to content

Commit 722aef6

Browse files
committed
Fix how the draft release is created in release.yaml
1 parent 1a9800a commit 722aef6

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

.github/workflows/release.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,18 +156,21 @@ jobs:
156156
ref: ${{ github.event.inputs.commit_sha }}
157157

158158
- name: Download all artifacts
159-
uses: actions/download-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
159+
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
160160
with:
161161
path: artifacts
162162

163163
- name: Create Release
164164
env:
165165
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
166166
run: |
167-
RELEASE_TAG="v0.158.0"
168-
RELEASE_NAME="Release v0.158.0"
167+
set -ex
168+
169+
VERSION=$(grep '^version = ' source/rust/autonomy_command/Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
170+
RELEASE_TAG="v$VERSION"
171+
RELEASE_NAME="Release v$VERSION"
169172
COMMIT_SHA="${{ github.event.inputs.commit_sha || github.sha }}"
170-
RELEASE_BODY="Release v0.158.0"
173+
RELEASE_BODY="Release v$VERSION"
171174
172175
gh release create "$RELEASE_TAG" \
173176
--title "$RELEASE_NAME" \
@@ -181,8 +184,10 @@ jobs:
181184
for binary_file in "$artifact_dir"/*; do
182185
if [ -f "$binary_file" ]; then
183186
asset_name="autonomy-${target}"
184-
echo "Uploading $binary_file as $asset_name"
185-
gh release upload "$RELEASE_TAG" "$binary_file#$asset_name"
187+
# Copy binary with the target-specific name
188+
cp "$binary_file" "$asset_name"
189+
echo "Uploading $asset_name"
190+
gh release upload "$RELEASE_TAG" "$asset_name"
186191
fi
187192
done
188193
fi

0 commit comments

Comments
 (0)