-
Notifications
You must be signed in to change notification settings - Fork 446
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update publish workflow to push whl to internal pypi
- Loading branch information
Showing
3 changed files
with
25 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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,17 +40,22 @@ 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: | ||
# unpacks default artifact into dist/ | ||
# 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/[email protected] | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
- name: Publish package distributions to TestPyPI | ||
if: ${{ steps.check-tag.outputs.match == '' }} | ||
uses: pypa/[email protected] | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |