release-pypi.yml 889 B

123456789101112131415161718192021222324252627282930313233343536
  1. name: Release to PyPI
  2. on:
  3. push:
  4. branches:
  5. - main # or whatever branch you want to use
  6. - pypi-release
  7. jobs:
  8. release:
  9. runs-on: ubuntu-latest
  10. environment:
  11. name: pypi
  12. url: https://pypi.org/p/open-webui
  13. permissions:
  14. id-token: write
  15. steps:
  16. - name: Checkout repository
  17. uses: actions/checkout@v4
  18. with:
  19. fetch-depth: 0
  20. - name: Install Git
  21. run: sudo apt-get update && sudo apt-get install -y git
  22. - uses: actions/setup-node@v4
  23. with:
  24. node-version: 22
  25. - uses: actions/setup-python@v5
  26. with:
  27. python-version: 3.11
  28. - name: Build
  29. run: |
  30. python -m pip install --upgrade pip
  31. pip install build
  32. python -m build .
  33. - name: Publish package distributions to PyPI
  34. uses: pypa/gh-action-pypi-publish@release/v1