Skip to content

Removes another rogue space after another backslash. #5

Removes another rogue space after another backslash.

Removes another rogue space after another backslash. #5

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@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Check tag matches pyproject.toml version
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"
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
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@v4
with:
name: python-dist
path: dist/
build_extension:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- 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@v4
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@v4
with:
name: python-dist
path: dist/
- name: Download DXT artifacts
uses: actions/download-artifact@v4
with:
name: dxt-dist
path: ./
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
*.dxt
dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}