2525 options : --memory 100g --gpus device=1 --shm-size 53687091200
2626 steps :
2727 - uses : actions/checkout@v4
28- - name : (CI) Code Style check
28+ - name : Code Style check
2929 run : |
3030 echo "Workspace: ${GITHUB_WORKSPACE}"
3131 ls
@@ -46,12 +46,14 @@ jobs:
4646 container : *container_template
4747 steps :
4848 - uses : actions/checkout@v4
49- - name : (CI) Build docs
49+ - name : Build docs
5050 run : |
51- pip install -e .
51+ pip install -e . --extra-index-url http://pyp.open3dv.site:2345/simple/ --trusted-host pyp.open3dv.site
5252 pip install -r docs/requirements.txt
5353 cd ${GITHUB_WORKSPACE}/docs
5454 echo "Start Building docs..."
55+ pip uninstall pymeshlab -y
56+ pip install pymeshlab==2023.12.post3
5557 make html
5658 - name : Upload docs artifact
5759 if : github.event_name == 'push' && github.ref == 'refs/heads/main'
@@ -71,11 +73,13 @@ jobs:
7173 container : *container_template
7274 steps :
7375 - uses : actions/checkout@v4
74- - name : (CI) Run tests
76+ - name : Run tests
7577 run : |
76- pip install -e .
78+ pip install -e . --extra-index-url http://pyp.open3dv.site:2345/simple/ --trusted-host pyp.open3dv.site
7779 echo "Unit test Start"
7880 export HF_ENDPOINT=https://hf-mirror.com
81+ pip uninstall pymeshlab -y
82+ pip install pymeshlab==2023.12.post3
7983 pytest tests
8084
8185 publish :
@@ -92,11 +96,49 @@ jobs:
9296 container : *container_template
9397 steps :
9498 - uses : actions/checkout@v4
95- - name : (CI) Publish package
96- run : echo "start publish stage"
97- - name : (CI) Download docs artifact
99+ - name : Download docs artifact
98100 uses : actions/download-artifact@v4
99101 with :
100102 name : github-pages
101- - name : (CI) Deploy GitHub Pages
102- uses : actions/deploy-pages@v4
103+
104+ - name : Deploy GitHub Pages
105+ uses : actions/deploy-pages@v4
106+
107+
108+ release :
109+ if : startsWith(github.ref, 'refs/tags/v')
110+ runs-on : Linux
111+ permissions :
112+ contents : write
113+ id-token : write # PyPI Trusted Publishing
114+
115+ container : *container_template
116+
117+ steps :
118+ - uses : actions/checkout@v4
119+ with :
120+ fetch-depth : 0
121+
122+ - name : (Release) Install build tools
123+ run : |
124+ python -m pip install --upgrade pip
125+ pip install build
126+
127+ - name : (Release) Build sdist and wheel
128+ run : |
129+ python -m build --wheel
130+
131+ - name : (Release) Create GitHub Release (draft)
132+ uses : softprops/action-gh-release@v2
133+ with :
134+ draft : true
135+ generate_release_notes : true
136+ files : |
137+ dist/*
138+ env :
139+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
140+
141+ - name : (Release) Publish to PyPI
142+ uses : pypa/gh-action-pypi-publish@release/v1
143+ with :
144+ password : ${{ secrets.PYPI_API_TOKEN }}
0 commit comments