mirror of
https://github.com/bndr/pipreqs.git
synced 2025-06-06 03:25:21 +00:00
Update publish action to support version bump
This commit is contained in:
parent
c0ec937188
commit
4826afdac0
30
.github/workflows/pypi-publish.yml
vendored
30
.github/workflows/pypi-publish.yml
vendored
@ -1,14 +1,28 @@
|
||||
name: Python package
|
||||
name: Deploy to PyPI
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
build_and_publish:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
POETRY_VIRTUALENVS_CREATE: "false"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build and publish to pypi
|
||||
uses: JRubics/poetry-publish@v1.17
|
||||
with:
|
||||
pypi_token: ${{ secrets.PYPI_TOKEN }}
|
||||
ignore_dev_requirements: "yes"
|
||||
|
||||
- name: Install poetry with bumpversion plugin
|
||||
run: |
|
||||
pipx install poetry
|
||||
pipx inject poetry poetry-bumpversion
|
||||
|
||||
- name: Build the package and bump version
|
||||
run: |
|
||||
poetry version ${{ github.ref_name }}
|
||||
poetry build
|
||||
|
||||
- name: Publish to PyPI
|
||||
run: |
|
||||
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
|
||||
poetry publish --repository test-pypi
|
@ -1,3 +1,3 @@
|
||||
__author__ = 'Vadim Kravcenko'
|
||||
__email__ = 'vadim.kravcenko@gmail.com'
|
||||
__version__ = '0.4.13'
|
||||
__version__ = '0.4.19'
|
||||
|
@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "pipreqs"
|
||||
version = "0.4.13"
|
||||
name = "pipreqs-build-test"
|
||||
version = "0.4.19"
|
||||
description = "Pip requirements.txt generator based on imports in project"
|
||||
authors = ["Vadim Kravcenko <vadim.kravcenko@gmail.com>"]
|
||||
license = "Apache-2.0"
|
||||
@ -34,6 +34,8 @@ tox = "^4.11.3"
|
||||
coverage = "^7.3.2"
|
||||
sphinx = { version = "^7.2.6", python = ">=3.9" }
|
||||
|
||||
[tool.poetry_bumpversion.file."pipreqs/__init__.py"]
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry.core.masonry.api"
|
Loading…
x
Reference in New Issue
Block a user