Browse Source

Add a workflow to support pip installation

pull/1090/head
Hironsan 4 years ago
parent
commit
8ba409e792
1 changed files with 47 additions and 0 deletions
  1. 47
      .github/workflows/pypi-publish.yml

47
.github/workflows/pypi-publish.yml

@ -0,0 +1,47 @@
name: Upload Python Package
on:
release:
types: [created]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Preparation
run: |
mkdir app/client
cp README.md app/README.md
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Build with Node.js
run: |
yarn install
yarn build
cp -r dist ../app/client/
working-directory: ./frontend
- name: Setup Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
pip install -r requirements.txt
- name: collectstatic
run: |
python manage.py collectstatic --noinput
working-directory: ./app
- name: Build a binary wheel and a source tarball
run: |
python setup.py sdist bdist_wheel
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
Loading…
Cancel
Save