From 09d3c2fbf87510c27f48f2049452b945d8f28f8f Mon Sep 17 00:00:00 2001 From: sourcepirate Date: Sat, 30 May 2026 18:18:17 +0530 Subject: [PATCH 1/2] Updated publish status --- .github/workflows/publish.yml | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..fd97b3c --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,45 @@ +name: Publish to PyPI + +on: + workflow_dispatch: + +jobs: + build: + name: Build distributions + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Install build + run: python -m pip install build + - name: Build distributions + run: python -m build + - name: Check distributions + run: | + pip install twine + twine check dist/* + - name: Store distributions + uses: actions/upload-artifact@v4 + with: + name: pypi-dist + path: dist/ + + publish: + name: Publish to PyPI + needs: build + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/neutro + permissions: + id-token: write # Required for OIDC + steps: + - name: Download distributions + uses: actions/download-artifact@v4 + with: + name: pypi-dist + path: dist/ + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 From 07ab0ee490794ac2099d191040170aeaf11e3518 Mon Sep 17 00:00:00 2001 From: Sathya Narrayanan Date: Sat, 30 May 2026 20:52:21 +0800 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/workflows/publish.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fd97b3c..c13b4c1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -27,12 +27,13 @@ jobs: path: dist/ publish: + if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' name: Publish to PyPI needs: build runs-on: ubuntu-latest environment: name: pypi - url: https://pypi.org/p/neutro + url: https://pypi.org/project/neutro/ permissions: id-token: write # Required for OIDC steps: