diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bdd1c98..52f3c0f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,31 +2,30 @@ name: Upload Python Package on: release: - types: [created] + types: [published] + +permissions: + contents: read jobs: deploy: + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - + - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: python-version: '3.8' - - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools wheel twine build - - - name: Build wheels - run: python setup.py bdist_wheel - - - name: Upload wheels - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - twine upload dist/* \ No newline at end of file + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: ${{ secrets.PYPI_USERNAME }} + password: ${{ secrets.PYPI_PASSWORD }} diff --git a/mkdocs_changelog_plugin/plugin.py b/mkdocs_changelog_plugin/plugin.py index b35981f..ae65a8a 100644 --- a/mkdocs_changelog_plugin/plugin.py +++ b/mkdocs_changelog_plugin/plugin.py @@ -3,7 +3,6 @@ import yaml from jinja2 import Template -from rich import print from mkdocs.config import config_options from mkdocs.plugins import BasePlugin diff --git a/setup.py b/setup.py index 438648d..8588fe6 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ def read(fname): setup( name='mkdocs-changelog-plugin', - version='0.1.2', + version='0.1.3', author='TonyCrane', author_email='me@tonycrane.cc', description='A MkDocs plugin that create changelog in a page',