From 6971cf0d25ee1b73a7b2f71b5b013b28768a4588 Mon Sep 17 00:00:00 2001 From: Jatin Varlyani Date: Tue, 7 May 2024 19:44:14 +0530 Subject: [PATCH 1/5] Create python-publish.yml --- .github/workflows/python-publish.yml | 39 ++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/python-publish.yml diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..b7a704b --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,39 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Upload Python Package + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} From 6fb4f5d446839bb1a3a4f25b7aaa7239c41ed281 Mon Sep 17 00:00:00 2001 From: Jatin Varlyani Date: Wed, 8 May 2024 12:56:19 +0530 Subject: [PATCH 2/5] Added workflow to run on PR raised to main --- .github/workflows/python-publish.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index b7a704b..4b9a378 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -9,8 +9,11 @@ name: Upload Python Package on: + pull_request: + branches: [main] release: types: [published] + permissions: contents: read From 79b6d13450c1f6d077c9aae43dc3f106392b15d2 Mon Sep 17 00:00:00 2001 From: Jatin Varlyani Date: Mon, 20 May 2024 10:14:34 +0530 Subject: [PATCH 3/5] change the classifier in setup --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 53a07e2..93618a7 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ "developers and analysts to quickly transform data by specifying their requirements in a " "simple YAML file.", classifiers=[ - 'License :: Apache License', + 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3.7' ], From 4fc32e7be396627759af1e6d5936644a928fba1b Mon Sep 17 00:00:00 2001 From: Jatin Varlyani Date: Tue, 28 May 2024 11:21:02 +0530 Subject: [PATCH 4/5] change pkg name to ingen-lib --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 93618a7..318ac07 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ import setuptools from setuptools import setup -PKG_NAME = 'ingen' +PKG_NAME = 'ingen-lib' MAIN_PKG = 'ingen' VERSION_PY_FILE = os.path.join(MAIN_PKG, 'version.py') DEFAULT_PKG_VERSION = '1.0.0' From 2fa06876bb07a18635cbfc8bdafdf398e7901889 Mon Sep 17 00:00:00 2001 From: Jatin Varlyani Date: Tue, 28 May 2024 11:41:30 +0530 Subject: [PATCH 5/5] Added the trigger to run only on pushes into main branch --- .github/workflows/python-publish.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 4b9a378..aa6ee32 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -9,12 +9,9 @@ name: Upload Python Package on: - pull_request: + push: branches: [main] - release: - types: [published] - permissions: contents: read