Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: publish to testpypi #8

Merged
merged 1 commit into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish package to PyPI

on:
release:
types:
- created

jobs:
build:
name: Build and Publish to PyPI
runs-on: ubuntu-latest

environment:
name: pypi
url: https://test.pypi.org/p/pystrukts

permissions:
id-token: write

steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- uses: ./.github/actions/test

- name: Package the extension
run: |
pip install build
python -m build --sdist

- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,5 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

src/_version.py
27 changes: 27 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[build-system]
requires = ["setuptools>=42", "wheel", "setuptools_scm"]
build-backend = "setuptools.build_meta"

[project]
name = "pystrukts"
description = "Advanced data structures for Python."
readme = "README.md"
requires-python = ">=3.8"
dynamic = ["version"]
license = { file = "LICENSE" }

dependencies = [
]

authors = [
{ name = "Rubén Pérez Mercado", email = "rubenpermerc@gmail.com" }
]

[tool.setuptools_scm]
write_to = "pystrukts/_version.py"

[project.optional-dependencies]
dev = [
"pytest>=6.0",
"pylint",
]