Debian Codegraph @

.github/workflows/release.yml

raw
1 name: Release
2
3 on:
4 push:
5 tags:
6 - '*'
7
8 jobs:
9 build:
10 if: github.repository == 'charettes/django-polymodels'
11 runs-on: ubuntu-latest
12
13 steps:
14 - uses: actions/checkout@v4
15 with:
16 fetch-depth: 0
17
18 - name: Set up Python
19 uses: actions/setup-python@v5
20 with:
21 python-version: 3.9
22
23 - name: Install dependencies
24 run: |
25 python -m pip install -U pip
26 python -m pip install -U setuptools twine wheel
27 - name: Build package
28 run: |
29 python setup.py --version
30 python setup.py sdist --format=gztar bdist_wheel
31 twine check dist/*
32 - name: Upload packages to Pypi
33 if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
34 uses: pypa/gh-action-pypi-publish@master
35 with:
36 user: __token__
37 password: ${{ secrets.PYPI_API_TOKEN }}