From cd6b03a5340d8ecb7b6093e2eb1f0cd437fc42eb Mon Sep 17 00:00:00 2001 From: Haroon Chaudhry Date: Fri, 14 Nov 2025 11:31:22 -0500 Subject: [PATCH 1/2] fix: corrected os and platform labels Change-Id: I85fa4bf028ccd39e07ba9c9b72d7c39e8da6d866 --- .github/workflows/nightly-release.yml | 74 +++++++++++++-------------- 1 file changed, 36 insertions(+), 38 deletions(-) diff --git a/.github/workflows/nightly-release.yml b/.github/workflows/nightly-release.yml index 7473a60..d22bf8d 100644 --- a/.github/workflows/nightly-release.yml +++ b/.github/workflows/nightly-release.yml @@ -1,17 +1,3 @@ -# 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: Nightly Release on: @@ -44,18 +30,41 @@ jobs: ACTIONS_STEP_DEBUG: true strategy: matrix: - goos: [linux, windows, darwin] - goarch: [amd64, arm64] - + platform: + - { + goos: "linux", + goarch: "amd64", + bin_file: "devops-mcp-server", + archive: "linux.x64.devops.tar.gz", + archive_cmd: 'tar -czvf "${ARCHIVE_PATH}" -C "${RELEASE_DIR}" .', + } + - { + goos: "darwin", + goarch: "arm64", + bin_file: "devops-mcp-server", + archive: "darwin.arm64.devops.tar.gz", + archive_cmd: 'tar -czvf "${ARCHIVE_PATH}" -C "${RELEASE_DIR}" .', + } + + - { + goos: "windows", + goarch: "amd64", + bin_file: "devops-mcp-server.exe", + archive: "win32.x64.devops.zip", + archive_cmd: 'zip -j "${ARCHIVE_PATH}" "${RELEASE_DIR}"/*', + } steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - name: prep-release env: RAG_DB_PATH: "${RELEASE_DIR}/devops-rag.db" + BIN_FILE: "${{ matrix.platform.bin_file }}" run: | mkdir -p "${RELEASE_DIR}" - cp ../gemini-extension.json "${RELEASE_DIR}/" + command_exp='.mcpServers."devops-mcp".command = "${extensionPath}${/}' + command_exp="${command_exp}${BIN_FILE}\"" + jq "${command_exp}" < ../gemini-extension.json >"${RELEASE_DIR}/gemini-extension.json" cp ../README.md "${RELEASE_DIR}/" cp ../local-rag/devops-rag.db "${RELEASE_DIR}/" @@ -69,32 +78,21 @@ jobs: - name: Build run: | - export GOOS=${{ matrix.goos }} - export GOARCH=${{ matrix.goarch }} + export GOOS=${{ matrix.platform.goos }} + export GOARCH=${{ matrix.platform.goarch }} - bin_name="${RELEASE_DIR}/devops-mcp-server-${GOOS}-${GOARCH}" - if [[ "${GOOS}" == "windows" ]];then - bin_name="${bin_name}.exe" - fi - go build -o "${bin_name}" + output_path="${RELEASE_DIR}/${{ matrix.platform.bin_file }}" + go build -o "${output_path}" - name: Create release assets id: archive run: | - echo "Running for OS ${{ matrix.goos }} and ARCH ${{ matrix.goarch }}" mkdir -p "${DIST_DIR}" - archive_name="devops-mcp-server-${{ matrix.goos }}-${{ matrix.goarch }}" - if [[ "${{ matrix.goos }}" == "windows" ]];then - archive_name="${archive_name}.zip" - archive=""${DIST_DIR}"/${archive_name}" - zip -j "${archive}" "${RELEASE_DIR}"/* - else - archive_name="${archive_name}.tar.gz" - archive="${DIST_DIR}/${archive_name}" - tar -czvf "${archive}" -C "${RELEASE_DIR}" . - fi - echo "Created ${archive}" - echo "ARCHIVE_NAME=${archive_name}" >> "$GITHUB_OUTPUT" + echo "Creating ${{ matrix.platform.archive }}" + export ARCHIVE_PATH="${DIST_DIR}/${{ matrix.platform.archive }}" + sh -c "${{ matrix.platform.archive_cmd }}" + echo "Created ${ARCHIVE_PATH}" + echo "ARCHIVE_NAME=${{ matrix.platform.archive }}" >> "$GITHUB_OUTPUT" - name: Upload archive as artifact uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 From df0f520e351a3dcce41ec04a17cbefbc5ab30e7f Mon Sep 17 00:00:00 2001 From: Haroon Chaudhry Date: Fri, 14 Nov 2025 11:56:52 -0500 Subject: [PATCH 2/2] fix: added license Change-Id: I6303065594566a9c0c4be7fa760b8821b589f99f --- .github/workflows/nightly-release.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/nightly-release.yml b/.github/workflows/nightly-release.yml index d22bf8d..4e3dc84 100644 --- a/.github/workflows/nightly-release.yml +++ b/.github/workflows/nightly-release.yml @@ -1,3 +1,17 @@ +# 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: Nightly Release on: