From a72dc55358271e19f84a9a830f08b1729106b013 Mon Sep 17 00:00:00 2001 From: upayanmazumder Date: Thu, 28 Nov 2024 23:25:16 +0530 Subject: [PATCH] gg --- .github/workflows/test_cli-docker-image.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_cli-docker-image.yml b/.github/workflows/test_cli-docker-image.yml index d2d68a8..de53739 100644 --- a/.github/workflows/test_cli-docker-image.yml +++ b/.github/workflows/test_cli-docker-image.yml @@ -1,13 +1,16 @@ -name: Test CLI Docker Image +name: CLI Docker Image on: - pull_request: - branches: [main] - push: - branches: [main] + release: + types: [published] + +permissions: + contents: read + packages: write jobs: - test: + publish: + name: Publish to PyPI runs-on: ubuntu-latest steps: @@ -31,6 +34,7 @@ jobs: - name: Verify dist directory contents run: | + cd CLI if [ -z "$(ls -A dist)" ]; then echo "Error: dist directory is empty." exit 1 @@ -38,3 +42,8 @@ jobs: echo "dist directory contains:" ls -R dist fi + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }}