Skip to content

Commit 9f45a72

Browse files
authored
Merge pull request #8 from rubenperezm/dev
ci: publish to testpypi
2 parents bb5535d + 96d5c8a commit 9f45a72

File tree

3 files changed

+62
-0
lines changed

3 files changed

+62
-0
lines changed

.github/workflows/publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish package to PyPI
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
8+
jobs:
9+
build:
10+
name: Build and Publish to PyPI
11+
runs-on: ubuntu-latest
12+
13+
environment:
14+
name: pypi
15+
url: https://test.pypi.org/p/pystrukts
16+
17+
permissions:
18+
id-token: write
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: ./.github/actions/setup
23+
- uses: ./.github/actions/test
24+
25+
- name: Package the extension
26+
run: |
27+
pip install build
28+
python -m build --sdist
29+
30+
- name: Publish distribution to PyPI
31+
uses: pypa/gh-action-pypi-publish@release/v1
32+
with:
33+
skip-existing: true

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,5 @@ cython_debug/
160160
# and can be added to the global gitignore or merged into this file. For a more nuclear
161161
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
162162
#.idea/
163+
164+
src/_version.py

pyproject.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[build-system]
2+
requires = ["setuptools>=42", "wheel", "setuptools_scm"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "pystrukts"
7+
description = "Advanced data structures for Python."
8+
readme = "README.md"
9+
requires-python = ">=3.8"
10+
dynamic = ["version"]
11+
license = { file = "LICENSE" }
12+
13+
dependencies = [
14+
]
15+
16+
authors = [
17+
{ name = "Rubén Pérez Mercado", email = "[email protected]" }
18+
]
19+
20+
[tool.setuptools_scm]
21+
write_to = "pystrukts/_version.py"
22+
23+
[project.optional-dependencies]
24+
dev = [
25+
"pytest>=6.0",
26+
"pylint",
27+
]

0 commit comments

Comments
 (0)