From 1825250e70c029181bb2398a301bb32a02a2e121 Mon Sep 17 00:00:00 2001 From: Swetna Date: Wed, 30 Jul 2025 12:55:16 -0400 Subject: [PATCH] Updated push file to reflect the auto publish to pypi --- .github/workflows/push.yml | 25 +++++++++++++++++++++++++ changelog_entry.yaml | 6 ++++++ 2 files changed, 31 insertions(+) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index f65bcff13..86e31fd89 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -123,3 +123,28 @@ jobs: run: docker build -t ghcr.io/policyengine/policyengine docker - name: Push container run: docker push ghcr.io/policyengine/policyengine + publish-to-pypi: + name: Publish to PyPI + runs-on: ubuntu-latest + if: | + (github.repository == 'PolicyEngine/policyengine-api') + && (github.event.head_commit.message == 'Update PolicyEngine API') + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: Install uv + uses: astral-sh/setup-uv@v5 + - name: Install package + run: uv pip install -e ".[dev]" --system + - name: Build package + run: make + - name: Publish a Python distribution to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI }} + skip-existing: true \ No newline at end of file diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb..48e5fd1e9 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,6 @@ +- bump: patch + changes: + changed: + - Updated push file to auto publish to pypi during git push + +