v1.5.0 #29
Workflow file for this run
This file contains hidden or 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
| # Build and Release Wheels | |
| name: Build and Release Wheels | |
| on: | |
| release: | |
| types: [created] | |
| permissions: | |
| contents: write | |
| jobs: | |
| # Build the wheels using the reusable building workflow | |
| build_wheels: | |
| name: Call reusable building workflow | |
| uses: ./.github/workflows/building.yml | |
| create_release_and_upload_packages: | |
| name: Upload to GitHub Release | |
| needs: [build_wheels] | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.10'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download packages | |
| id: download_artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| # The unique artifact names from building.yml all start with | |
| # "compiled_wheels_python${{ matrix.python-version }}" so this pattern | |
| # will match them all and merge them into the 'dist' directory. | |
| pattern: compiled_wheels_python${{ matrix.python-version }}* | |
| path: dist | |
| merge-multiple: true | |
| - name: Upload packages to GitHub Release | |
| id: upload_assets | |
| run: | | |
| for file in $(ls ./dist/*.*); do | |
| echo "Uploading $file..." | |
| filename=$(basename "$file") | |
| encoded_filename=$(echo "$filename" | sed 's/+/%2B/g') | |
| curl -X POST \ | |
| -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
| -H "Content-Type: application/zip" \ | |
| --data-binary @"$file" \ | |
| "${{ github.event.release.upload_url }}=$encoded_filename" | |
| done | |
| generate_simple_index_pages: | |
| name: Generate Simple Index Pages | |
| needs: [create_release_and_upload_packages] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Generate Simple Index Pages | |
| run: python .github/workflows/generate_simple_index_pages.py --outdir ./whl | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./whl | |
| destination_dir: whl | |
| keep_files: false | |
| cname: docs.gsplat.studio | |
| upload_pypi: | |
| name: Upload to PyPi | |
| needs: [build_wheels] | |
| runs-on: ubuntu-latest | |
| environment: production | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: pypi_packages | |
| path: dist | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.7' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install build twine | |
| shell: bash | |
| - name: Publish package to PyPI | |
| env: | |
| PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
| run: | | |
| BUILD_NO_CUDA=1 python -m build | |
| twine upload --username __token__ --password $PYPI_TOKEN dist/* | |
| shell: bash |