From 0ab5ee2ea79cb696545a930e08a2154136c85d85 Mon Sep 17 00:00:00 2001 From: Mayur Prajapati Date: Thu, 26 Sep 2024 15:52:54 +0530 Subject: [PATCH] added pypi --- ...h-to-test-pypi.yml => publish-to-pypi.yml} | 34 ++++++++++++++----- pyproject.toml | 10 +++--- 2 files changed, 30 insertions(+), 14 deletions(-) rename .github/workflows/{publish-to-test-pypi.yml => publish-to-pypi.yml} (56%) diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-pypi.yml similarity index 56% rename from .github/workflows/publish-to-test-pypi.yml rename to .github/workflows/publish-to-pypi.yml index cd56d3c..48707c6 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -1,9 +1,6 @@ -name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI +name: Publish package to PyPI -on: - push: - branches: - - build_workflows +on: [push] jobs: build: @@ -30,14 +27,15 @@ jobs: name: python-package-distributions path: dist/ publish-to-testpypi: - name: Publish Python 🐍 distribution 📦 to TestPyPI + name: Publish to TestPyPI + if: startsWith(github.ref, 'refs/tags/') needs: - build runs-on: ubuntu-latest environment: name: testpypi - url: https://test.pypi.org/p/pyscalr + url: https://test.pypi.org/p/scalr permissions: id-token: write # IMPORTANT: mandatory for trusted publishing @@ -48,7 +46,27 @@ jobs: with: name: python-package-distributions path: dist/ - - name: Publish distribution 📦 to TestPyPI + - name: Publish to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 with: repository-url: https://test.pypi.org/legacy/ + publish-to-pypi: + name: >- + Publish to PyPI + if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes + needs: + - build + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/scalr # Replace with your PyPI project name + permissions: + id-token: write # IMPORTANT: mandatory for trusted publishing + steps: + - name: Download all the dists + uses: actions/download-artifact@v4 + with: + name: python-package-distributions + path: dist/ + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/pyproject.toml b/pyproject.toml index 68f44af..ed29abc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,19 +3,18 @@ requires = ["hatchling", "hatch-requirements-txt"] build-backend = "hatchling.build" [project] -name = "pyscalr" -version = "0.0.3" +name = "scaLR" +version = "0.0.2" requires-python = ">=3.9" authors = [ - { name="Infocusp", email="info@infocusp.com" }, + { name="Infocusp", email="saurabh@infocusp.com" }, ] description = "scaLR: Single cell analysis using low resource." readme = "README.md" classifiers = [ "Programming Language :: Python :: 3.9", "Operating System :: OS Independent", - "Intended Audience :: Science/Research", - "License :: OSI Approved :: MIT License", + "Intended Audience :: Science/Research" ] dynamic = ["dependencies"] @@ -38,4 +37,3 @@ license = {file = "LICENSE"} Repository = "https://github.com/infocusp/scaLR.git" Homepage = "https://github.com/infocusp/scaLR" Issues = "https://github.com/infocusp/scaLR/issues" -