Skip to content

chore(deps): update astral-sh/setup-uv action to v7.1.3 #8

chore(deps): update astral-sh/setup-uv action to v7.1.3

chore(deps): update astral-sh/setup-uv action to v7.1.3 #8

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:
jobs:
test:
uses: ./.github/workflows/test.yml
build_package:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: '3.13'
- name: Install uv
uses: astral-sh/setup-uv@5a7eac68fb9809dea845d802897dc5c723910fa3 # v7.1.3
- name: Check tag matches version files
run: |
TAG_VERSION="${GITHUB_REF##*/}"
TAG_VERSION_NO_PREFIX="${TAG_VERSION#v}"
echo "Tag version: $TAG_VERSION (stripped: $TAG_VERSION_NO_PREFIX)"
PYPROJECT_VERSION=$(grep '^version =' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
echo "pyproject.toml version: $PYPROJECT_VERSION"
INIT_VERSION=$(grep '^__version__ =' src/pythonanywhere_mcp_server/__init__.py | sed 's/__version__ = "\(.*\)"/\1/')
echo "__init__.py version: $INIT_VERSION"
if [ "$TAG_VERSION_NO_PREFIX" != "$PYPROJECT_VERSION" ]; then
echo "Tag version ($TAG_VERSION_NO_PREFIX) does not match pyproject.toml version ($PYPROJECT_VERSION)" >&2
exit 1
fi
if [ "$TAG_VERSION_NO_PREFIX" != "$INIT_VERSION" ]; then
echo "Tag version ($TAG_VERSION_NO_PREFIX) does not match __init__.py version ($INIT_VERSION)" >&2
exit 1
fi
if [ "$PYPROJECT_VERSION" != "$INIT_VERSION" ]; then
echo "pyproject.toml version ($PYPROJECT_VERSION) does not match __init__.py version ($INIT_VERSION)" >&2
exit 1
fi
shell: bash
- name: Build package
run: uv build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Upload Python artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: python-dist
path: dist/
build_extension:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: '24'
- name: Check tag matches manifest.json version
run: |
TAG_VERSION="${GITHUB_REF##*/}"
TAG_VERSION_NO_PREFIX="${TAG_VERSION#v}"
echo "Tag version: $TAG_VERSION (stripped: $TAG_VERSION_NO_PREFIX)"
MANIFEST_VERSION=$(jq -r .version manifest.json)
echo "manifest.json version: $MANIFEST_VERSION"
if [ "$TAG_VERSION_NO_PREFIX" != "$MANIFEST_VERSION" ]; then
echo "Tag version ($TAG_VERSION_NO_PREFIX) does not match manifest.json version ($MANIFEST_VERSION)" >&2
exit 1
fi
shell: bash
- name: Install DXT toolchain
run: npm install -g @anthropic-ai/dxt
- name: Pack extension
run: dxt pack
- name: Upload DXT artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: dxt-dist
path: '*.dxt'
create_release:
runs-on: ubuntu-latest
needs: [build_package, build_extension]
steps:
- name: Download Python artifacts
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: python-dist
path: dist/
- name: Download DXT artifacts
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: dxt-dist
path: ./
- name: Create Release
uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
with:
files: |
*.dxt
dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}