ci: use --check-url instead of --skip-existing for uv publish #46
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: read | |
| deployments: write | |
| jobs: | |
| pypi-publish: | |
| name: Publish to PyPI | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/project/kimi-mneme/${{ github.ref_name }}/ | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: "3.12" | |
| enable-cache: true | |
| - name: Sync version from git tag | |
| run: | | |
| VERSION=${GITHUB_REF_NAME#v} | |
| sed -i "s/^version = \".*\"/version = \"${VERSION}\"/" pyproject.toml | |
| sed -i "s/^__version__ = \".*\"/__version__ = \"${VERSION}\"/" mneme/__init__.py | |
| sed -i 's/"version": ".*"/"version": "'"${VERSION}"'"/' plugin/plugin.json | |
| sed -i 's/"version": ".*"/"version": "'"${VERSION}"'"/' docs/TOOLS.md | |
| sed -i "s/<!-- VERSION -->.*<!-- \/VERSION -->/<!-- VERSION -->${VERSION}<!-- \/VERSION -->/g" README.md | |
| sed -i "s/<!-- VERSION -->.*<!-- \/VERSION -->/<!-- VERSION -->${VERSION}<!-- \/VERSION -->/g" docs/index.html | |
| sed -i "s/<!-- VERSION -->.*<!-- \/VERSION -->/<!-- VERSION -->${VERSION}<!-- \/VERSION -->/g" docs/ARCHITECTURE.md | |
| sed -i "s/<!-- VERSION -->.*<!-- \/VERSION -->/<!-- VERSION -->${VERSION}<!-- \/VERSION -->/g" docs/WEB_UI.md | |
| - name: Build package | |
| run: uv build | |
| - name: Publish to PyPI | |
| env: | |
| UV_PUBLISH_TOKEN: ${{ secrets.PYPI }} | |
| run: uv publish --check-url https://pypi.org/simple/kimi-mneme/ |