dfff36b1d2
Publish plotstyle / build-and-publish (push) Successful in 7s
CI / test:pytest (push) Successful in 22s
CI / lint:ruff (push) Successful in 16s
CI / format:ruff (push) Successful in 15s
CI / typecheck:ty (push) Successful in 21s
CI / vulnerabilities:pip-audit (push) Successful in 18s
The built-in Actions token was rejected by the Gitea package registry (401 reqPackageAccess); a PAT with write:package scope is required.
39 lines
1.0 KiB
YAML
39 lines
1.0 KiB
YAML
name: Publish plotstyle
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "plotstyle-v*"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
publish:
|
|
name: build-and-publish
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: astral-sh/setup-uv@v9.0.0
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Verify tag matches package version
|
|
run: |
|
|
tag_version="${GITHUB_REF_NAME#plotstyle-v}"
|
|
pkg_version="$(uv version --short --package plotstyle)"
|
|
if [ "$tag_version" != "$pkg_version" ]; then
|
|
echo "Tag plotstyle-v$tag_version does not match pyproject.toml version $pkg_version" >&2
|
|
exit 1
|
|
fi
|
|
|
|
- name: Build wheel and sdist
|
|
run: uv build --package plotstyle -o dist
|
|
|
|
- name: Publish to Gitea package registry
|
|
env:
|
|
UV_PUBLISH_USERNAME: lars
|
|
UV_PUBLISH_PASSWORD: ${{ secrets.PACKAGE_DEPLOY_KEY }}
|
|
run: uv publish --publish-url "${{ github.server_url }}/api/packages/${{ github.repository_owner }}/pypi" dist/*
|