Skip to content

Commit 3df234a

Browse files
authored
maintenance (#25)
* Update workflows * Change the way we ship * Need the version
1 parent 4ea9b15 commit 3df234a

File tree

5 files changed

+25
-27
lines changed

5 files changed

+25
-27
lines changed

.github/workflows/cd.yml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,45 @@
11
name: Upload Python Package
22

33
on:
4-
push:
5-
tags:
6-
- "v*"
4+
release:
5+
types: ["plublished"]
76

87
jobs:
98
deploy:
109
runs-on: ubuntu-latest
1110

1211
steps:
13-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v4
13+
1414
- name: Set up Python
1515
uses: actions/setup-python@v4
1616
with:
1717
python-version: "3.x"
1818

19+
- name: Setup uv
20+
uses: astral-sh/setup-uv@v2
21+
with:
22+
enable-cache: true
23+
uv-version: "0.4.9"
24+
1925
- name: Install dependencies
2026
run: |
21-
python -m pip install --upgrade pip
22-
pip install setuptools wheel hatch
23-
hatch env create
27+
uv venv .venv
28+
uv pip install ".[dev]"
2429
2530
- name: Make sure we didn't forget anything in pre-commit
2631
run: |
27-
hatch run pre-commit run --all
32+
uv run pre-commit run --all
2833
2934
- name: Test with pytest
3035
run: |
31-
hatch run pytest
36+
uv run pytest
3237
3338
- name: Build and publish
3439
env:
35-
HATCH_INDEX_USER: ${{ secrets.PYPI_USERNAME }}
36-
HATCH_INDEX_AUTH: ${{ secrets.PYPI_PASSWORD }}
40+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
41+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
42+
TWINE_NON_INTERACTIVE: "1"
3743
run: |
38-
hatch build
39-
hatch publish --no-prompt
44+
uv build
45+
uvx twine upload dist/*

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,21 @@ jobs:
2020
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
2121

2222
steps:
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
24+
2425
- uses: actions/setup-python@v4
2526
with:
2627
python-version: ${{ matrix.python-version }}
2728

2829
- name: Setup uv
29-
uses: yezz123/setup-uv@v4
30+
uses: astral-sh/setup-uv@v2
3031
with:
32+
enable-cache: true
3133
uv-version: "0.4.9"
32-
uv-venv: ".venv"
3334

3435
- name: Run tests for ${{ matrix.python-version }}
3536
run: |
37+
uv venv .venv
3638
uv pip install ".[dev]"
3739
uv run pre-commit run --all
3840
uv run pytest

Makefile

Lines changed: 0 additions & 7 deletions
This file was deleted.

pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,3 @@ build-backend = "hatchling.build"
4545

4646
[tool.hatch.version]
4747
path = "src/bibx/__init__.py"
48-
49-
[tool.hatch.envs.default]
50-
features = ["dev"]

src/bibx/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"read_any",
2222
]
2323

24-
__version__ = "0.0.1a9"
24+
__version__ = "0.1.0"
2525

2626

2727
def read_scopus_bib(*files: TextIO) -> Collection:

0 commit comments

Comments
 (0)