diff --git a/.github/workflows/python-package.yml b/.github/workflows/ci.yml similarity index 100% rename from .github/workflows/python-package.yml rename to .github/workflows/ci.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..84e1f49 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,24 @@ +name: Publish Package + +on: + release: + types: + - published + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + - uses: actions/cache@v4 + with: + path: ~/.cache/uv + key: publish-${{ hashFiles('pyproject.toml') }} + - uses: arduino/setup-task@v1 + - run: curl -LsSf https://astral.sh/uv/install.sh | sh + - run: task publish + env: + PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} diff --git a/Taskfile.yml b/Taskfile.yml index a2ca718..46a3d44 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -45,3 +45,10 @@ tasks: - git push --tags - gh release create --generate-notes {{.CLI_ARGS}} - gh release upload {{.CLI_ARGS}} ./dist/* + + publish: + cmds: + - rm -rf dist/* + - uvx --from build pyproject-build --installer uv + - uv tool run twine check dist/* + - uv tool run twine upload dist/* --username __token__ --password $PYPI_TOKEN diff --git a/pyproject.toml b/pyproject.toml index 449bd5c..b0db7e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "fast-version" -version = "1.3.0" +version = "1.3.1" description = "Fastapi versioning package with accept header" authors = [ { email = "me@shiriev.ru" },