From a400485723459b9f1b857e23bf23da1d1275e0eb Mon Sep 17 00:00:00 2001 From: kshtiijrajsharma Date: Mon, 25 Mar 2024 11:08:36 +0545 Subject: [PATCH] (ci) : release : build and publish change dependency --- .../workflows/build-and-push-on-release.yml | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build-and-push-on-release.yml b/.github/workflows/build-and-push-on-release.yml index aa6e00b..7786842 100644 --- a/.github/workflows/build-and-push-on-release.yml +++ b/.github/workflows/build-and-push-on-release.yml @@ -9,8 +9,34 @@ env: IMAGE_NAME: ${{ github.repository }} jobs: + build-and-push-pypi: + runs-on: ubuntu-latest + + steps: + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.x + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + + - name: Build package + run: python setup.py sdist bdist_wheel + - name: Publish to PyPI + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + run: twine upload dist/* + build-and-push-image: runs-on: ubuntu-latest + needs: build-and-push-pypi permissions: contents: read packages: write @@ -38,29 +64,3 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - - build-and-push-pypi: - runs-on: ubuntu-latest - needs: build-and-push-image - - steps: - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.x - - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - - name: Build package - run: python setup.py sdist bdist_wheel - - name: Publish to PyPI - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} - run: twine upload dist/*