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.

48 lines
1.1 KiB

3 years ago
3 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 pipenv
  33. pipenv sync --dev
  34. - name: collectstatic
  35. run: |
  36. pipenv run collectstatic
  37. working-directory: ./backend
  38. - name: Build a binary wheel and a source tarball
  39. run: |
  40. python setup.py sdist
  41. - name: Publish a Python distribution to PyPI
  42. uses: pypa/gh-action-pypi-publish@master
  43. with:
  44. user: ${{ secrets.PYPI_USERNAME }}
  45. password: ${{ secrets.PYPI_PASSWORD }}