-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (33 loc) · 962 Bytes
/
publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: "Publish"
on:
release:
types:
- created
jobs:
publish_to_pypi:
name: 📦 Publish to PyPi
runs-on: ubuntu-latest
env:
DJANGO_SETTINGS_MODULE: querystring_tag.testapp.settings
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: 🐍 Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: ⬇️ Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[test]
- name: 🧪 Run tests
run: pytest
- name: ⬇️ Install build dependencies
run: python -m pip install build --user
- name: 🏗️ Package for PyPi
run: python -m build --sdist --wheel --outdir dist/ .
- name: 🚀 Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}