24.2b0 #39
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@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
cache-dependency-path: "**/pyproject.toml" | |
cache: pip | |
python-version: "3.11" | |
- 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@v4 | |
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@v4 | |
- name: Build wheels | |
uses: pypa/[email protected] | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: dist-${{ matrix.os }} | |
path: ./wheelhouse/*.whl | |
build-sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build sdist | |
run: pipx run build --sdist | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: dist-sdist | |
path: dist/*.tar.gz | |
upload-to-pypi: | |
name: Publish release to PyPI | |
environment: release | |
needs: [build-wheels, build-sdist, build-docs] | |
permissions: | |
id-token: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
merge-multiple: true | |
path: dist | |
pattern: dist-* | |
- uses: pypa/gh-action-pypi-publish@release/v1 | |
update-gh-pages: | |
name: Update gh-pages | |
needs: [upload-to-pypi] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: docs | |
path: docs | |
- name: Clone gh-pages | |
uses: actions/checkout@v4 | |
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/[email protected] | |
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 |