From 623d889fd0aa7a44dd82143e084f55bae7e1396e Mon Sep 17 00:00:00 2001 From: Juha Louhiranta Date: Mon, 3 Mar 2025 12:33:48 +0200 Subject: [PATCH] ci: release-please automatically pushes the package to PyPi Release-As: 0.13.2 Refs: RATYK-86 --- .github/workflows/release-please.yml | 22 ++++++++++++++++++++++ .github/workflows/release.yml | 27 --------------------------- 2 files changed, 22 insertions(+), 27 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 6186793..6c29475 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -16,3 +16,25 @@ jobs: runs-on: ubuntu-latest steps: - uses: googleapis/release-please-action@v4 + id: release + # Build and publish to PyPI + - name: Checkout + uses: actions/checkout@v4 + if: ${{ steps.release.outputs.release_created }} + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.9 + if: ${{ steps.release.outputs.release_created }} + - name: Install dependencies + run: pip install -U setuptools wheel build + if: ${{ steps.release.outputs.release_created }} + - name: Build + run: python -m build . + if: ${{ steps.release.outputs.release_created }} + - name: Publish + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} + verbose: true + if: ${{ steps.release.outputs.release_created }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 0f72ab8..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Publish to PyPI - -on: - push: - tags: - - 'django-helusers-v*' - -jobs: - build-and-publish: - name: Build and publish - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.9 - - name: Install dependencies - run: pip install -U setuptools wheel build - - name: Build - run: python -m build . - - name: Publish - uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{ secrets.PYPI_API_TOKEN }} - verbose: true