Skip to content

Commit

Permalink
(ci) : release : build and publish change dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitijrajsharma committed Mar 25, 2024
1 parent 75267b1 commit a400485
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions .github/workflows/build-and-push-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/*

0 comments on commit a400485

Please sign in to comment.