Skip to content

Commit 1139261

Browse files
authored
update naming convention
1 parent e640d50 commit 1139261

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

.github/workflows/package-and-upload-assets.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ name: Package and Upload Release Assets
1818
env:
1919
PACKAGE_NAME: "cloud-sql-postgresql"
2020
FILES_TO_PACKAGE: "gemini-extension.json CLOUD-SQL-POSTGRESQL.md LICENSE"
21-
GCS_BUCKET_URL: "https://storage.googleapis.com/genai-toolbox"
21+
GCS_BUCKET_URL: "https://storage.googleapis.com/genai-toolbox/geminicli"
2222

2323
on:
2424
release:
@@ -32,10 +32,10 @@ jobs:
3232
strategy:
3333
matrix:
3434
platform:
35-
- { os: "linux", arch: "x64", download_path_segment: "linux/amd64/toolbox-extensions", binary_suffix: "", archive_extension: "tar.gz", archive_command: 'tar -czvf "${ARCHIVE_NAME}" -C staging .' }
36-
- { os: "darwin", arch: "arm64", download_path_segment: "darwin/arm64/toolbox-extensions", binary_suffix: "", archive_extension: "tar.gz", archive_command: 'tar -czvf "${ARCHIVE_NAME}" -C staging .' }
37-
- { os: "darwin", arch: "x64", download_path_segment: "darwin/amd64/toolbox-extensions", binary_suffix: "", archive_extension: "tar.gz", archive_command: 'tar -czvf "${ARCHIVE_NAME}" -C staging .' }
38-
- { os: "win32", arch: "x64", download_path_segment: "windows/amd64/toolbox-extensions.exe", binary_suffix: ".exe", archive_extension: "zip", archive_command: '(cd staging && zip ../"${ARCHIVE_NAME}" *)' }
35+
- { os: "linux", arch: "x64", download_path_segment: "linux/amd64", binary_suffix: "", archive_extension: "tar.gz", archive_command: 'tar -czvf "${ARCHIVE_NAME}" -C staging .' }
36+
- { os: "darwin", arch: "arm64", download_path_segment: "darwin/arm64", binary_suffix: "", archive_extension: "tar.gz", archive_command: 'tar -czvf "${ARCHIVE_NAME}" -C staging .' }
37+
- { os: "darwin", arch: "x64", download_path_segment: "darwin/amd64", binary_suffix: "", archive_extension: "tar.gz", archive_command: 'tar -czvf "${ARCHIVE_NAME}" -C staging .' }
38+
- { os: "win32", arch: "x64", download_path_segment: "windows/amd64", binary_suffix: ".exe", archive_extension: "zip", archive_command: '(cd staging && zip ../"${ARCHIVE_NAME}" *)' }
3939

4040
steps:
4141
- name: Checkout code at the new tag
@@ -47,7 +47,7 @@ jobs:
4747
id: vars
4848
run: |
4949
echo "archive_name=${{ matrix.platform.os }}.${{ matrix.platform.arch }}.${{ env.PACKAGE_NAME }}.${{ matrix.platform.archive_extension }}" >> $GITHUB_OUTPUT
50-
echo "target_binary=toolbox${{ matrix.platform.binary_suffix }}" >> $GITHUB_OUTPUT
50+
echo "source_binary=toolbox${{ matrix.platform.binary_suffix }}" >> $GITHUB_OUTPUT
5151
5252
- name: Get Toolbox Version
5353
id: get_toolbox_version
@@ -60,11 +60,12 @@ jobs:
6060
env:
6161
TOOLBOX_VERSION: ${{ steps.get_toolbox_version.outputs.TOOLBOX_VERSION }}
6262
DOWNLOAD_PATH_SEGMENT: ${{ matrix.platform.download_path_segment }}
63+
SOURCE_BINARY: ${{ steps.vars.outputs.source_binary }}
6364
run: |
64-
DOWNLOAD_URL="${GCS_BUCKET_URL}/v${TOOLBOX_VERSION}/${DOWNLOAD_PATH_SEGMENT}"
65+
DOWNLOAD_URL="${GCS_BUCKET_URL}/v${TOOLBOX_VERSION}/${DOWNLOAD_PATH_SEGMENT}/${SOURCE_BINARY}"
6566
6667
echo "Downloading binary from: ${DOWNLOAD_URL}"
67-
curl -L --fail -o "${target_binary}" "${DOWNLOAD_URL}"
68+
curl -L --fail -o "${SOURCE_BINARY}" "${DOWNLOAD_URL}"
6869
6970
echo "Binary downloaded and prepared."
7071
ls -l
@@ -74,15 +75,15 @@ jobs:
7475
env:
7576
ARCHIVE_COMMAND: ${{ matrix.platform.archive_command }}
7677
ARCHIVE_NAME: ${{ steps.vars.outputs.archive_name }}
77-
target_binary: ${{ steps.vars.outputs.target_binary }}
78+
SOURCE_BINARY: ${{ steps.vars.outputs.source_binary }}
7879
run: |
7980
ARCHIVE_NAME="${{ matrix.platform.os }}.${{ matrix.platform.arch }}.${PACKAGE_NAME}.${{ matrix.platform.archive_extension }}"
80-
target_binary="toolbox${{ matrix.platform.binary_suffix }}"
81+
SOURCE_BINARY="toolbox${{ matrix.platform.binary_suffix }}"
8182
82-
echo "Packaging ${target_binary} into ${ARCHIVE_NAME}"
83+
echo "Packaging ${SOURCE_BINARY} into ${ARCHIVE_NAME}"
8384
8485
mkdir staging
85-
cp "${target_binary}" "staging/${target_binary}"
86+
cp "${SOURCE_BINARY}" "staging/${SOURCE_BINARY}"
8687
cp ${FILES_TO_PACKAGE} staging/
8788
8889
if [[ "${{ matrix.platform.os }}" == "win32" ]]; then

0 commit comments

Comments
 (0)