File tree Expand file tree Collapse file tree 2 files changed +47
-4
lines changed
Expand file tree Collapse file tree 2 files changed +47
-4
lines changed Original file line number Diff line number Diff line change 1+ name : " [DO NOT TRIGGER] Publish to PyPI"
2+
3+ # To run this workflow manually from the Actions tab
4+ on : workflow_dispatch
5+
6+ jobs :
7+ build-n-publish :
8+ name : Build and publish Python 🐍 distribution 📦 to PyPI
9+ runs-on : ubuntu-latest
10+
11+ steps :
12+ - uses : actions/checkout@v3
13+ - name : Set up Python
14+ uses : actions/setup-python@v4
15+ with :
16+ python-version : " 3.x"
17+ - name : Build distribution 📦
18+ run : |
19+ pip install wheel
20+ make dist
21+ - name : Validate
22+ run : |
23+ pip install dist/*.whl
24+ python -c "import oci_mlflow;"
25+ # To run publish to test PyPI, secret with token needs to be added to oracle/oci-mlflow project.
26+ # This one - GH_OCI_MLFLOW_TESTPYPI_TOKEN - removed from project secrets after initial test.
27+ - name : Publish distribution 📦 to Test PyPI
28+ env :
29+ TWINE_USERNAME : __token__
30+ TWINE_PASSWORD : ${{ secrets.GH_OCI_MLFLOW_TESTPYPI_TOKEN }}
31+ run : |
32+ pip install twine
33+ twine upload -r testpypi dist/* -u $TWINE_USERNAME -p $TWINE_PASSWORD
34+ # - name: Publish distribution 📦 to PyPI
35+ # env:
36+ # TWINE_USERNAME: __token__
37+ # TWINE_PASSWORD: ${{ secrets.GH_OCI_MLFLOW_PYPI_TOKEN }}
38+ # run: |
39+ # pip install twine
40+ # twine upload dist/* -u $TWINE_USERNAME -p $TWINE_PASSWORD
Original file line number Diff line number Diff line change 1- include .env
1+ - include .env
22
3- .PHONY : build clean deploy
3+ .PHONY : clean dist wheel
44
55TAG: =latest
66IMAGE_NAME: =oci-mlflow
99
1010clean :
1111 @rm -rf dist build oci_mlflow.egg-info
12+ @find ./ -name ' *.pyc' -exec rm -f {} \;
13+ @find ./ -name ' Thumbs.db' -exec rm -f {} \;
14+ @find ./ -name ' *~' -exec rm -f {} \;
1215
13- build : clean
16+ dist : clean
1417 @python setup.py bdist_wheel
1518
16- wheel : build tmp-copy-whl
19+ wheel : dist tmp-copy-whl
1720
1821build-image :
1922 docker build --network host --build-arg RND=$(RND ) -t $(IMAGE_NAME ) :$(TAG ) -f container-image/Dockerfile .
You can’t perform that action at this time.
0 commit comments