You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.1 KiB

4 years ago
4 years ago
  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: Preparation
  11. run: |
  12. mkdir backend/client
  13. - name: Use Node.js
  14. uses: actions/setup-node@v1
  15. with:
  16. node-version: '12.x'
  17. - name: Build with Node.js
  18. run: |
  19. yarn install
  20. yarn build
  21. cp -r dist ../backend/client/
  22. working-directory: ./frontend
  23. env:
  24. PUBLIC_PATH: "/static/_nuxt/"
  25. - name: Setup Python 3.8
  26. uses: actions/setup-python@v2
  27. with:
  28. python-version: 3.8
  29. - name: Install dependencies
  30. run: |
  31. python -m pip install --upgrade pip
  32. pip install poetry
  33. poetry install
  34. - name: collectstatic
  35. run: |
  36. poetry run task collectstatic
  37. - name: Build a binary wheel and a source tarball
  38. run: |
  39. poetry build
  40. - name: Publish a Python distribution to PyPI
  41. uses: pypa/gh-action-pypi-publish@master
  42. with:
  43. user: ${{ secrets.PYPI_USERNAME }}
  44. password: ${{ secrets.PYPI_PASSWORD }}