24.1b3 #37
Workflow file for this run
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
name: Publish | |
on: | |
release: | |
types: [released] | |
env: | |
SC_ORIGIN: https://github.com/supercollider/supercollider.git | |
SC_BRANCH: develop | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-docs: | |
name: Build docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
cache-dependency-path: "**/pyproject.toml" | |
cache: pip | |
python-version: "3.10" | |
- name: Install SuperCollider | |
uses: ./.github/actions/supercollider | |
with: | |
branch: ${{ env.SC_BRANCH }} | |
origin: ${{ env.SC_ORIGIN }} | |
- name: Install Supriya | |
run: pip install -e .[docs] | |
- name: Install APT deps | |
shell: bash | |
run: | | |
export DEBIAN_FRONTEND=noninteractive | |
sudo apt-get update --yes | |
sudo apt-get install --yes \ | |
espeak \ | |
ffmpeg \ | |
graphviz \ | |
lame | |
- name: Build docs | |
run: make docs | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: docs | |
path: ./docs/build/html/ | |
build-wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-2019, macos-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build wheels | |
uses: pypa/[email protected] | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: ./wheelhouse/*.whl | |
build-sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build sdist | |
run: pipx run build --sdist | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist/*.tar.gz | |
upload-to-pypi: | |
name: Publish release to PyPI | |
needs: [build-wheels, build-sdist, build-docs] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
path: dist | |
- uses: pypa/[email protected] | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
update-gh-pages: | |
name: Update gh-pages | |
needs: [upload-to-pypi] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: docs | |
path: docs | |
- name: Clone gh-pages | |
uses: actions/checkout@v3 | |
with: | |
path: gh-pages | |
ref: gh-pages | |
- name: Rsync docs | |
run: rsync -rtv --del --exclude=.git docs/ gh-pages/ | |
- name: Touch .nojekyll | |
run: touch gh-pages/.nojekyll | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
allow_empty_commit: true | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: gh-pages | |
user_name: github-actions[bot] | |
user_email: github-actions[bot]@users.noreply.github.com |