Skip to content

Commit 0e477bf

Browse files
committed
Fix PyPi publishing
1 parent 60f419f commit 0e477bf

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ jobs:
99
publish:
1010
name: "Publish release"
1111
runs-on: "ubuntu-latest"
12+
permissions:
13+
id-token: write
1214

1315
steps:
1416
- uses: "actions/checkout@v4"
@@ -24,7 +26,4 @@ jobs:
2426
with:
2527
files: dist/*
2628
- name: "Publish to PyPI"
27-
run: "make publish"
28-
env:
29-
TWINE_USERNAME: __token__
30-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
29+
uses: pypa/gh-action-pypi-publish@release/v1

Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ help:
1313

1414
bootstrap:
1515
python3 -m venv $(VENV)
16-
$(PYTHON) -m pip install --upgrade pip==24.2 setuptools==75.2.0 wheel==0.44.0 twine==5.1.1 build==1.2.2.post1
16+
$(PYTHON) -m pip install --upgrade pip==24.2 setuptools==75.2.0 wheel==0.44.0 build==1.2.2.post1
1717
$(PYTHON) -m pip install -e .[postgres,sqlite,dev]
1818

1919
lint: $(VENV)
@@ -26,9 +26,6 @@ test: $(VENV)
2626
build: $(VENV)
2727
$(PYTHON) -m build
2828

29-
publish: $(VENV)
30-
$(PYTHON) -m twine upload dist/*
31-
3229
clean:
3330
rm -rf $(VENV) .coverage .mypy_cache .pytest_cache .ruff_cache htmlcov based.egg-info coverage.xml build dist
3431
find . -type d -name "__pycache__" | xargs rm -rf

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ the base class, adding private helpers as needed.
101101

102102
## TODO
103103

104-
- [ ] CI/CD
105-
- [ ] Building and uploading packages to PyPi
104+
- [x] CI/CD
105+
- [x] Building and uploading packages to PyPi
106106
- [x] Testing with multiple Python versions
107107
- [ ] Database URL parsing and building
108108
- [ ] MySQL backend

based/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.2.1"
1+
__version__ = "0.4.1"
22

33
from based.backends import Session
44
from based.database import Database

0 commit comments

Comments
 (0)