Skip to content

Publish to PyPI and npm #4

Publish to PyPI and npm

Publish to PyPI and npm #4

Workflow file for this run

name: Publish to PyPI and npm
on:
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
- name: Create venv
run: uv venv
- name: Run tests
run: make test
- name: Publish PyPI and npm
run: make publish
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Get Version
id: get_version
run: |
version=$(uv run python -c "import mcp_scan; print(mcp_scan.__version__)")
echo "version=$version" >> $GITHUB_OUTPUT
- name: Tag release
run: |
git tag v${{ steps.get_version.outputs.version }}
git push origin v${{ steps.get_version.outputs.version }}