Skip to content

Commit 5ec7d50

Browse files
committed
add workflow for publish
1 parent 6f62f6c commit 5ec7d50

File tree

4 files changed

+32
-1
lines changed

4 files changed

+32
-1
lines changed
File renamed without changes.

.github/workflows/publish.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish Package
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-python@v5
14+
with:
15+
python-version: "3.12"
16+
- uses: actions/cache@v4
17+
with:
18+
path: ~/.cache/uv
19+
key: publish-${{ hashFiles('pyproject.toml') }}
20+
- uses: arduino/setup-task@v1
21+
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
22+
- run: task publish
23+
env:
24+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

Taskfile.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,10 @@ tasks:
4545
- git push --tags
4646
- gh release create --generate-notes {{.CLI_ARGS}}
4747
- gh release upload {{.CLI_ARGS}} ./dist/*
48+
49+
publish:
50+
cmds:
51+
- rm -rf dist/*
52+
- uvx --from build pyproject-build --installer uv
53+
- uv tool run twine check dist/*
54+
- uv tool run twine upload dist/* --username __token__ --password $PYPI_TOKEN

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "fast-version"
3-
version = "1.3.0"
3+
version = "1.3.1"
44
description = "Fastapi versioning package with accept header"
55
authors = [
66
{ email = "me@shiriev.ru" },

0 commit comments

Comments
 (0)