deploy.yml 799 B

12345678910111213141516171819202122232425262728
  1. name: Upload Python Package
  2. on:
  3. release:
  4. types: [created]
  5. jobs:
  6. deploy:
  7. runs-on: ubuntu-latest
  8. steps:
  9. - uses: actions/checkout@v2
  10. - name: set up python
  11. uses: actions/setup-python@v2
  12. with:
  13. python-version: '3.x'
  14. - name: install dependencies
  15. run: |
  16. python -m pip install --upgrade pip
  17. pip install setuptools wheel twine
  18. sed -i -E "s#VERSION#${GITHUB_REF/refs\/tags\//}#g" ./setup.py
  19. sed -i -E "s#VERSION#${GITHUB_REF/refs\/tags\//}#g" ./bucketstore.py
  20. - name: build and publish
  21. env:
  22. TWINE_USERNAME: ${{ secrets.PYPI_USER }}
  23. TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
  24. run: |
  25. python setup.py sdist bdist_wheel
  26. twine upload dist/*