gguf-publish.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # This workflow will upload a Python Package using Twine when a GGUF release is created
  2. # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
  3. # See `gguf-py/README.md` for how to make a release.
  4. # This workflow uses actions that are not certified by GitHub.
  5. # They are provided by a third-party and are governed by
  6. # separate terms of service, privacy policy, and support
  7. # documentation.
  8. name: Upload Python Package
  9. on:
  10. workflow_dispatch:
  11. push:
  12. # Pattern matched against refs/tags
  13. tags:
  14. - 'gguf-v*' # Push events to every version tag
  15. jobs:
  16. deploy:
  17. runs-on: ubuntu-latest
  18. steps:
  19. - uses: actions/checkout@v4
  20. - name: Set up Python
  21. uses: actions/setup-python@v5
  22. with:
  23. python-version: '3.9.x'
  24. - name: Install dependencies
  25. run: |
  26. cd gguf-py
  27. python -m pip install poetry
  28. poetry install
  29. - name: Build package
  30. run: cd gguf-py && poetry build
  31. - name: Publish package
  32. uses: pypa/gh-action-pypi-publish@release/v1
  33. with:
  34. password: ${{ secrets.PYPI_API_TOKEN }}
  35. packages-dir: gguf-py/dist