diff --git a/.github/workflows/pypi_deploy.yml b/.github/workflows/pypi_deploy.yml new file mode 100644 index 0000000..92e4e10 --- /dev/null +++ b/.github/workflows/pypi_deploy.yml @@ -0,0 +1,32 @@ +name: Publish Python 🐍 distribution to PyPI + +on: + push: + tags: + - "v*.*.*" # run only when you push a version tag (e.g., v1.0.0) + +jobs: + build-n-publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Install build dependencies + run: | + python -m pip install --upgrade pip + pip install build twine + + - name: Build package + run: python -m build + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_KEY }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index aa0c8f9..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Semantic Release - -on: - push: - branches: - - main - -jobs: - release: - runs-on: ubuntu-latest - permissions: - id-token: write - contents: write - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Python Semantic Release - id: release - uses: python-semantic-release/python-semantic-release@v9.12.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Publish package to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - if: steps.release.outputs.released == 'true' - with: - password: ${{ secrets.PYPI_API_KEY }} diff --git a/pyproject.toml b/pyproject.toml index dcf182a..25a396f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,12 +87,4 @@ where = ["."] [tool.pytest.ini_options] pythonpath = [ "." -] - -[tool.semantic_release] -version_toml = [ - "pyproject.toml:project.version", -] -branch = "main" -build_command = "pip install build && python -m build" -commit_parser = "angular" \ No newline at end of file +] \ No newline at end of file