Skip to content

Commit 13a3993

Browse files
authored
Update publish workflow (#2625)
update publish workflow to push whl to internal pypi
1 parent 2c9b745 commit 13a3993

File tree

3 files changed

+25
-17
lines changed

3 files changed

+25
-17
lines changed

.github/workflows/publish.yml

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and upload to PyPI
1+
name: Build and upload to internal PyPI
22

33
on:
44
workflow_dispatch: # run on request (no need for PR)
@@ -40,17 +40,22 @@ jobs:
4040
name: Publish package
4141
needs: [build_wheels, build_sdist]
4242
environment: pypi
43-
runs-on: ubuntu-latest
43+
runs-on: [self-hosted, linux, x64, dev]
4444
permissions: write-all
4545
steps:
46+
- name: Set up Python
47+
uses: actions/setup-python@v4
48+
with:
49+
python-version: "3.10"
50+
- name: Install dependencies
51+
run: python -m pip install twine
4652
- name: Download artifacts
4753
uses: actions/download-artifact@v3
4854
with:
4955
# unpacks default artifact into dist/
5056
# if `name: artifact` is omitted, the action will create extra parent dir
5157
name: artifact
5258
path: dist
53-
# to determine where to publish the source distribution to PyPI or TestPyPI
5459
- name: Check tag
5560
id: check-tag
5661
uses: actions-ecosystem/action-regex-match@v2
@@ -66,15 +71,18 @@ jobs:
6671
tag: ${{ github.ref }}
6772
overwrite: true
6873
file_glob: true
69-
- name: Publish package distributions to PyPI
70-
if: ${{ steps.check-tag.outputs.match != '' }}
71-
uses: pypa/[email protected]
72-
with:
73-
password: ${{ secrets.PYPI_API_TOKEN }}
74-
- name: Publish package distributions to TestPyPI
75-
if: ${{ steps.check-tag.outputs.match == '' }}
76-
uses: pypa/[email protected]
77-
with:
78-
password: ${{ secrets.TESTPYPI_API_TOKEN }}
79-
repository-url: https://test.pypi.org/legacy/
80-
verbose: true
74+
- name: Check dist contents
75+
run: twine check dist/*
76+
- name: Publish package dist to internal PyPI
77+
run: |
78+
export no_proxy=${{ secrets.PYPI_HOST }}
79+
export REPOSITORY_URL=http://${{ secrets.PYPI_HOST }}:${{ secrets.PYPI_PORT }}
80+
twine upload --verbose --repository-url $REPOSITORY_URL dist/* -u ${{ secrets.PYPI_USER }} -p ${{ secrets.PYPI_PASSWORD }}
81+
- name: Clean up dist
82+
if: ${{ always() }}
83+
run: |
84+
if OUTPUT=$(ls | grep -c dist)
85+
then
86+
echo "Cleaning up dist directory"
87+
rm -r dist
88+
fi

src/otx/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
# Copyright (C) 2021-2023 Intel Corporation
44
# SPDX-License-Identifier: Apache-2.0
55

6-
__version__ = "1.4.4rc1"
6+
__version__ = "1.4.4"
77
# NOTE: Sync w/ src/otx/api/usecases/exportable_code/demo/requirements.txt on release
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
openvino==2023.0
22
openvino-model-api==0.1.6
3-
otx==1.4.4rc1
3+
otx==1.4.4
44
numpy>=1.21.0,<=1.23.5 # np.bool was removed in 1.24.0 which was used in openvino runtime

0 commit comments

Comments
 (0)