From d1613ed741651385d4e281795783dd3464ee67c9 Mon Sep 17 00:00:00 2001 From: Thiyagu55 Date: Tue, 28 Dec 2021 18:02:15 +0530 Subject: [PATCH 1/2] python release workflow added --- .github/workflows/python-pypi-release.yaml | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/python-pypi-release.yaml diff --git a/.github/workflows/python-pypi-release.yaml b/.github/workflows/python-pypi-release.yaml new file mode 100644 index 0000000..fbb2d93 --- /dev/null +++ b/.github/workflows/python-pypi-release.yaml @@ -0,0 +1,40 @@ +name: Publish Python Package to PYPI + +on: + release: + types: [published] + branches: + - python-sqlcommenter + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.7' + - name: Install dependencies + working-directory: ./sqlcommenter-python + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + working-directory: ./sqlcommenter-python + run: python -m build + - name: Publish distribution package to test PYPI + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository_url: https://test.pypi.org/legacy/ + packages_dir: sqlcommenter-python/dist/ + verbose: true + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} + packages_dir: sqlcommenter-python/dist/ + verbose: true \ No newline at end of file From 76ab3dea76ec73daed0cb423764cb00b72ad71e1 Mon Sep 17 00:00:00 2001 From: Thiyagu55 Date: Fri, 31 Dec 2021 18:09:06 +0530 Subject: [PATCH 2/2] Adding new line at the end of workflow file --- .github/workflows/python-pypi-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-pypi-release.yaml b/.github/workflows/python-pypi-release.yaml index fbb2d93..101b1b6 100644 --- a/.github/workflows/python-pypi-release.yaml +++ b/.github/workflows/python-pypi-release.yaml @@ -37,4 +37,4 @@ jobs: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} packages_dir: sqlcommenter-python/dist/ - verbose: true \ No newline at end of file + verbose: true