Skip to content

Bump up version

Bump up version #7

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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.13'
- name: Install uv
uses: astral-sh/setup-uv@bd01e18f51369d5a26f1651c3cb451d3417e3bba # v6.3.1
- 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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: python-dist
path: dist/
build_extension:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '22'
- 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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
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@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: python-dist
path: dist/
- name: Download DXT artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: dxt-dist
path: ./
- name: Create Release
uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2
with:
files: |
*.dxt
dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}