feat(release): publish standalone CLI archives
This commit is contained in:
@@ -729,7 +729,7 @@ jobs:
|
||||
VERSION: ${{ needs.prepare.outputs.version }}
|
||||
run: |
|
||||
cat > release-notes.md <<EOF
|
||||
DBX MCP ${VERSION} provides precompiled native binaries for macOS, Linux, and Windows.
|
||||
DBX MCP and CLI ${VERSION} provide precompiled native binaries for macOS, Linux, and Windows.
|
||||
|
||||
Recommended npm installation:
|
||||
|
||||
@@ -739,20 +739,92 @@ jobs:
|
||||
|
||||
Native archives run without Node.js. Download the archive matching your operating system and CPU, verify it with \`SHA256SUMS\`, extract \`dbx-mcp\` (or \`dbx-mcp.exe\`), and configure your MCP client to run it directly.
|
||||
|
||||
The CLI archives use the \`dbx-cli-*\` prefix. Verify them with \`CLI-SHA256SUMS\`, extract \`dbx\` (or \`dbx.exe\`), and run it directly without Node.js.
|
||||
|
||||
This package release is separate from the DBX desktop application release and is intentionally not marked as the repository's latest release.
|
||||
EOF
|
||||
|
||||
if gh release view "${TAG}" >/dev/null 2>&1; then
|
||||
gh release upload "${TAG}" release-assets/* --clobber
|
||||
gh release edit "${TAG}" --title "DBX MCP ${VERSION}" --notes-file release-notes.md --latest=false
|
||||
gh release edit "${TAG}" --title "DBX Packages ${VERSION}" --notes-file release-notes.md --latest=false
|
||||
else
|
||||
gh release create "${TAG}" release-assets/* \
|
||||
--verify-tag \
|
||||
--title "DBX MCP ${VERSION}" \
|
||||
--title "DBX Packages ${VERSION}" \
|
||||
--notes-file release-notes.md \
|
||||
--latest=false
|
||||
fi
|
||||
|
||||
publish-cli-github-release:
|
||||
name: Publish CLI GitHub Release assets
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prepare, publish-cli, publish-mcp-github-release]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
ref: ${{ needs.prepare.outputs.tag }}
|
||||
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 22.13.0
|
||||
registry-url: https://registry.npmjs.org
|
||||
|
||||
- name: Build native CLI release archives from npm packages
|
||||
shell: bash
|
||||
env:
|
||||
VERSION: ${{ needs.prepare.outputs.version }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mkdir -p release-assets
|
||||
|
||||
pack_unix() {
|
||||
package_name="$1"
|
||||
asset_name="$2"
|
||||
work_dir="$(mktemp -d)"
|
||||
npm pack "${package_name}@${VERSION}" --pack-destination "${work_dir}" --json > "${work_dir}/pack.json"
|
||||
tarball="${work_dir}/$(jq -r '.[0].filename' "${work_dir}/pack.json")"
|
||||
tar -xzf "${tarball}" -C "${work_dir}"
|
||||
mkdir -p "${work_dir}/archive"
|
||||
cp "${work_dir}/package/bin/dbx" "${work_dir}/archive/dbx"
|
||||
chmod +x "${work_dir}/archive/dbx"
|
||||
tar -C "${work_dir}/archive" -czf "release-assets/${asset_name}.tar.gz" dbx
|
||||
}
|
||||
|
||||
pack_windows() {
|
||||
package_name="$1"
|
||||
asset_name="$2"
|
||||
work_dir="$(mktemp -d)"
|
||||
npm pack "${package_name}@${VERSION}" --pack-destination "${work_dir}" --json > "${work_dir}/pack.json"
|
||||
tarball="${work_dir}/$(jq -r '.[0].filename' "${work_dir}/pack.json")"
|
||||
tar -xzf "${tarball}" -C "${work_dir}"
|
||||
zip -j "release-assets/${asset_name}.zip" "${work_dir}/package/bin/dbx.exe"
|
||||
}
|
||||
|
||||
pack_unix "@dbx-app/cli-darwin-arm64" "dbx-cli-darwin-arm64"
|
||||
pack_unix "@dbx-app/cli-darwin-x64" "dbx-cli-darwin-x64"
|
||||
pack_unix "@dbx-app/cli-linux-arm64-gnu" "dbx-cli-linux-arm64-gnu"
|
||||
pack_unix "@dbx-app/cli-linux-x64-gnu" "dbx-cli-linux-x64-gnu"
|
||||
pack_windows "@dbx-app/cli-win32-arm64" "dbx-cli-win32-arm64"
|
||||
pack_windows "@dbx-app/cli-win32-x64" "dbx-cli-win32-x64"
|
||||
|
||||
(
|
||||
cd release-assets
|
||||
sha256sum *.tar.gz *.zip > CLI-SHA256SUMS
|
||||
)
|
||||
|
||||
- name: Attest native CLI release archives
|
||||
uses: actions/attest-build-provenance@v3
|
||||
with:
|
||||
subject-path: release-assets/*
|
||||
|
||||
- name: Upload CLI assets to GitHub Release
|
||||
shell: bash
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
TAG: ${{ needs.prepare.outputs.tag }}
|
||||
run: gh release upload "${TAG}" release-assets/* --clobber
|
||||
|
||||
publish-homebrew-formula:
|
||||
name: Publish Homebrew formula
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user