Skip to content

Document update

Document update #22

Workflow file for this run

name: Publish to PyPI
on:
push:
branches:
- main
release:
types: [created]
jobs:
deploy:
runs-on: ubuntu-latest
# Only publish to PyPI on release
if: github.event_name == 'release'
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
run: python -m build
- name: Publish package
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine upload dist/*
test:
runs-on: ubuntu-latest
# Run tests on every push to main
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Test build
env:
AMAP_MAPS_API_KEY: mock_key_for_testing
run: |
python -m pip install dist/*.whl
python -c "import amap_mcp_server"