Nightly Release #29
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Nightly Release | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" # Runs daily at midnight UTC | |
| workflow_dispatch: # Allows manual triggering of the workflow | |
| permissions: | |
| contents: write | |
| env: | |
| RELEASE: nightly | |
| jobs: | |
| prep-release: | |
| uses: ./.github/workflows/prep-release.yaml | |
| with: | |
| release: nightly | |
| build-release: | |
| needs: prep-release | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: devops-mcp-server | |
| env: | |
| RELEASE_DIR: "${{ github.workspace }}/release" | |
| DIST_DIR: "${{ github.workspace }}/dist" | |
| ACTIONS_RUNNER_DEBUG: true | |
| ACTIONS_STEP_DEBUG: true | |
| strategy: | |
| matrix: | |
| 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.arm.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}" | |
| 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}/" | |
| - name: Set up Go | |
| uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 | |
| with: | |
| go-version: "1.24.8" | |
| - name: Download Dependencies | |
| run: go mod tidy | |
| - name: Build | |
| run: | | |
| export GOOS=${{ matrix.platform.goos }} | |
| export GOARCH=${{ matrix.platform.goarch }} | |
| output_path="${RELEASE_DIR}/${{ matrix.platform.bin_file }}" | |
| go build -o "${output_path}" | |
| - name: Create release assets | |
| id: archive | |
| run: | | |
| mkdir -p "${DIST_DIR}" | |
| 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 | |
| with: | |
| name: ${{ steps.archive.outputs.ARCHIVE_NAME }} | |
| path: ${{ github.workspace }}/dist/* | |
| upload-assets: | |
| needs: [build-release] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 | |
| - name: Download all archives from artifacts | |
| uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5 | |
| with: | |
| path: artifacts | |
| - name: List downloaded files | |
| run: | | |
| echo "--- Downloaded files ---" | |
| ls -Rlrt artifacts/* | |
| echo "------------------------" | |
| - name: Upload release assets | |
| id: upload-assets | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release upload --clobber \ | |
| ${{ env.RELEASE }} \ | |
| artifacts/*/* |