diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3885e3ec9cf..2d5d14f1601 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,4 @@ -name: Build and upload to PyPI +name: Build and upload to internal PyPI on: workflow_dispatch: # run on request (no need for PR) @@ -40,9 +40,15 @@ jobs: name: Publish package needs: [build_wheels, build_sdist] environment: pypi - runs-on: ubuntu-latest + runs-on: [self-hosted, linux, x64, dev] permissions: write-all steps: + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install dependencies + run: python -m pip install twine - name: Download artifacts uses: actions/download-artifact@v3 with: @@ -50,7 +56,6 @@ jobs: # if `name: artifact` is omitted, the action will create extra parent dir name: artifact path: dist - # to determine where to publish the source distribution to PyPI or TestPyPI - name: Check tag id: check-tag uses: actions-ecosystem/action-regex-match@v2 @@ -66,15 +71,18 @@ jobs: tag: ${{ github.ref }} overwrite: true file_glob: true - - name: Publish package distributions to PyPI - if: ${{ steps.check-tag.outputs.match != '' }} - uses: pypa/gh-action-pypi-publish@v1.7.1 - with: - password: ${{ secrets.PYPI_API_TOKEN }} - - name: Publish package distributions to TestPyPI - if: ${{ steps.check-tag.outputs.match == '' }} - uses: pypa/gh-action-pypi-publish@v1.7.1 - with: - password: ${{ secrets.TESTPYPI_API_TOKEN }} - repository-url: https://test.pypi.org/legacy/ - verbose: true + - name: Check dist contents + run: twine check dist/* + - name: Publish package dist to internal PyPI + run: | + export no_proxy=${{ secrets.PYPI_HOST }} + export REPOSITORY_URL=http://${{ secrets.PYPI_HOST }}:${{ secrets.PYPI_PORT }} + twine upload --verbose --repository-url $REPOSITORY_URL dist/* -u ${{ secrets.PYPI_USER }} -p ${{ secrets.PYPI_PASSWORD }} + - name: Clean up dist + if: ${{ always() }} + run: | + if OUTPUT=$(ls | grep -c dist) + then + echo "Cleaning up dist directory" + rm -r dist + fi diff --git a/src/otx/__init__.py b/src/otx/__init__.py index 0730c04e7d7..320afca933b 100644 --- a/src/otx/__init__.py +++ b/src/otx/__init__.py @@ -3,5 +3,5 @@ # Copyright (C) 2021-2023 Intel Corporation # SPDX-License-Identifier: Apache-2.0 -__version__ = "1.4.4rc1" +__version__ = "1.4.4" # NOTE: Sync w/ src/otx/api/usecases/exportable_code/demo/requirements.txt on release diff --git a/src/otx/api/usecases/exportable_code/demo/requirements.txt b/src/otx/api/usecases/exportable_code/demo/requirements.txt index 26d5f57a346..eb4d7eb29fd 100644 --- a/src/otx/api/usecases/exportable_code/demo/requirements.txt +++ b/src/otx/api/usecases/exportable_code/demo/requirements.txt @@ -1,4 +1,4 @@ openvino==2023.0 openvino-model-api==0.1.6 -otx==1.4.4rc1 +otx==1.4.4 numpy>=1.21.0,<=1.23.5 # np.bool was removed in 1.24.0 which was used in openvino runtime