Try out mkdocs-material #684
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: Build and upload to PyPI | |
on: | |
pull_request: | |
push: | |
branches: | |
- "main" | |
tags: | |
- "v*" | |
release: | |
types: | |
- published | |
jobs: | |
build_artifacts: | |
name: Build artifacts | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up pixi | |
uses: prefix-dev/[email protected] | |
- name: Build | |
# It seems as though flit publish expects a .pypirc file as compared to | |
# only a token passed as an argument. | |
# See https://flit.pypa.io/en/latest/cmdline.html#flit-publish | |
run: | | |
pixi run flit build | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: dist/* | |
upload_pypi: | |
name: Upload to PyPI | |
needs: [build_artifacts] | |
runs-on: ubuntu-latest | |
if: github.event_name == 'release' && github.event.action == 'published' | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: artifact | |
path: dist | |
- uses: pypa/[email protected] | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_TOKEN }} |