Skip to content

Commit

Permalink
Added pypi build github action. (#85)
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Mittal <varunmittal91@gmail.com>
  • Loading branch information
varunmittal91 authored Sep 26, 2023
1 parent 7efbac5 commit 817dd7c
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[bumpversion]
current_version = 0.5.0
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>(rc|dev))(?P<build>\d+))?
serialize =
{major}.{minor}.{patch}-{release}{build}
{major}.{minor}.{patch}

[bumpversion:part:release]
optional_value = regular
values =
dev
rc
regular

[bumpversion:part:build]
first_value = 1

[bumpversion:file:pyproject.toml]
25 changes: 25 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish
on:
create:
tags:
- 'v\d\.\d\.\d'
- 'v\d\.\d\.\d-(dev|rc)\d'

jobs:
publish:
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install poetry
uses: abatilo/actions-poetry@v2
- name: Install dependencies
run: |
poetry build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pandera = {extras = ["mypy"], version = "^0.16.1"}
isort = "^5.12.0"
flake8 = "^6.1.0"
pre-commit = "^3.3.3"
bump2version = "^1.0.1"

[build-system]
requires = ["poetry-core"]
Expand Down

0 comments on commit 817dd7c

Please sign in to comment.