release.yml 618 B

1234567891011121314151617181920212223242526
  1. name: Release
  2. on:
  3. release:
  4. types: [published]
  5. jobs:
  6. PyPi:
  7. runs-on: ubuntu-latest
  8. steps:
  9. - uses: actions/checkout@v3
  10. - uses: actions/setup-python@v4
  11. with:
  12. python-version: "3.10"
  13. - run: python -m pip install --upgrade pip build wheel twine
  14. - uses: actions/setup-node@v3
  15. - name: Install Node dependencies
  16. run: npm ci
  17. - name: Minify JavaScript files
  18. run: npm run minify
  19. - run: python -m build --sdist --wheel
  20. - run: python -m twine upload dist/*
  21. env:
  22. TWINE_USERNAME: __token__
  23. TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}