Skip to content

Commit

Permalink
add workflow for publish
Browse files Browse the repository at this point in the history
  • Loading branch information
lesnik512 committed Aug 31, 2024
1 parent 6f62f6c commit 5ec7d50
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
File renamed without changes.
24 changes: 24 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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 }}
7 changes: 7 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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" },
Expand Down

0 comments on commit 5ec7d50

Please sign in to comment.