diff --git a/.github/workflows/package-and-upload-assets.yml b/.github/workflows/package-and-upload-assets.yml deleted file mode 100644 index 8ca05d3..0000000 --- a/.github/workflows/package-and-upload-assets.yml +++ /dev/null @@ -1,130 +0,0 @@ -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: Package and Upload Release Assets - -# Global variables -env: - PACKAGE_NAME: "cloud-sql-postgresql" - FILES_TO_PACKAGE: "gemini-extension.json CLOUD-SQL-POSTGRESQL.md LICENSE" - GCS_BUCKET_URL: "https://storage.googleapis.com/mcp-toolbox-for-databases/geminicli" - -on: - release: - types: [created] - -jobs: - package: - name: Package for ${{ matrix.platform.os }}-${{ matrix.platform.arch }} - runs-on: ubuntu-latest - - strategy: - matrix: - platform: - - { os: "linux", arch: "x64", download_path_segment: "linux/amd64", binary_suffix: "", archive_extension: "tar.gz", archive_command: 'tar -czvf "${ARCHIVE_NAME}" -C staging .' } - - { os: "darwin", arch: "arm64", download_path_segment: "darwin/arm64", binary_suffix: "", archive_extension: "tar.gz", archive_command: 'tar -czvf "${ARCHIVE_NAME}" -C staging .' } - - { os: "darwin", arch: "x64", download_path_segment: "darwin/amd64", binary_suffix: "", archive_extension: "tar.gz", archive_command: 'tar -czvf "${ARCHIVE_NAME}" -C staging .' } - - { os: "win32", arch: "x64", download_path_segment: "windows/amd64", binary_suffix: ".exe", archive_extension: "zip", archive_command: '(cd staging && zip -r ../"${ARCHIVE_NAME}" *)' } - steps: - - name: Checkout code at the new tag - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - with: - ref: ${{ github.event.release.tag_name }} - - - name: Set Dynamic Environment Variables - id: vars - run: | - echo "archive_name=${{ matrix.platform.os }}.${{ matrix.platform.arch }}.${{ env.PACKAGE_NAME }}.${{ matrix.platform.archive_extension }}" >> $GITHUB_OUTPUT - echo "source_binary=toolbox${{ matrix.platform.binary_suffix }}" >> $GITHUB_OUTPUT - - - name: Get Toolbox Version - id: get_toolbox_version - run: | - TOOLBOX_VERSION=$(cat toolbox_version.txt) - echo "Found toolbox version: ${TOOLBOX_VERSION}" - echo "TOOLBOX_VERSION=${TOOLBOX_VERSION}" >> $GITHUB_OUTPUT - - - name: Download Source Binary - env: - TOOLBOX_VERSION: ${{ steps.get_toolbox_version.outputs.TOOLBOX_VERSION }} - DOWNLOAD_PATH_SEGMENT: ${{ matrix.platform.download_path_segment }} - SOURCE_BINARY: ${{ steps.vars.outputs.source_binary }} - run: | - DOWNLOAD_URL="${GCS_BUCKET_URL}/v${TOOLBOX_VERSION}/${DOWNLOAD_PATH_SEGMENT}/${SOURCE_BINARY}" - echo "Downloading binary from: ${DOWNLOAD_URL}" - curl -L --fail -o "${SOURCE_BINARY}" "${DOWNLOAD_URL}" - chmod +x ${SOURCE_BINARY} - echo "Binary downloaded and prepared." - ls -l - - - name: Create release archive - id: create_archive - env: - ARCHIVE_COMMAND: ${{ matrix.platform.archive_command }} - ARCHIVE_NAME: ${{ steps.vars.outputs.archive_name }} - SOURCE_BINARY: ${{ steps.vars.outputs.source_binary }} - run: | - ARCHIVE_NAME="${{ matrix.platform.os }}.${{ matrix.platform.arch }}.${PACKAGE_NAME}.${{ matrix.platform.archive_extension }}" - SOURCE_BINARY="toolbox${{ matrix.platform.binary_suffix }}" - - echo "Packaging ${SOURCE_BINARY} into ${ARCHIVE_NAME}" - - mkdir -p staging/skills - cp "${SOURCE_BINARY}" "staging/${SOURCE_BINARY}" - cp -r ${FILES_TO_PACKAGE} staging/ - cp -r skills/* staging/skills/ - - echo "All assets staged." - ls -R staging - - # Create archive - eval "${ARCHIVE_COMMAND}" - echo "Created archive: ${ARCHIVE_NAME}" - echo "ARCHIVE_PATH=${ARCHIVE_NAME}" >> $GITHUB_OUTPUT - - - name: Upload archive as workflow artifact - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7 - with: - name: ${{ steps.vars.outputs.archive_name }} - path: ${{ steps.create_archive.outputs.ARCHIVE_PATH }} - # This job gathers all archives and uploads them to the GitHub Release. - upload: - name: Upload all assets to release - runs-on: ubuntu-latest - needs: package - permissions: - contents: write - steps: - - name: Checkout code - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - - - name: Download all archives from workflow artifacts - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 - with: - path: release-archives - - - name: List downloaded files - run: | - echo "--- Downloaded files ---" - ls -R release-archives - echo "------------------------" - - - name: Upload all assets to GitHub Release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITHUB_EVENT_RELEASE_TAG_NAME: ${{ github.event.release.tag_name }} - run: | - gh release upload \ - ${GITHUB_EVENT_RELEASE_TAG_NAME} \ - release-archives/*/* diff --git a/DEVELOPER.md b/DEVELOPER.md index 1d65188..3386b85 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -74,17 +74,6 @@ are currently tested in the [MCP Toolbox GitHub](https://github.com/googleapis/g * **Dependency Updates:** [Renovate](https://github.com/apps/forking-renovate) is configured to automatically create pull requests for dependency updates. -## Building the Extension - -The "build" process for this extension involves packaging the extension's -metadata files (`gemini-extension.json`, `cloud-sql-postgresql.md`, `LICENSE`) along with the -pre-built `toolbox` binary into platform-specific archives (`.tar.gz` or `.zip`). - -This process is handled automatically by the -[`package-and-upload-assets.yml`](.github/workflows/package-and-upload-assets.yml) -GitHub Actions workflow when a new release is created. Manual building is not -required. - ## Maintainer Information ### Team @@ -139,7 +128,3 @@ The process is handled by the [`mirror-changelog.yml`](.github/workflows/mirror- 2. **Merge Release PR:** A maintainer approves and merges the Release PR. This action triggers `release-please` to create a new GitHub tag and a corresponding GitHub Release. -3. **Package and Upload:** The new release triggers the - `package-and-upload-assets.yml` workflow. This workflow builds the - platform-specific extension archives and uploads them as assets to the - GitHub Release.