-
Notifications
You must be signed in to change notification settings - Fork 20
44 lines (42 loc) · 1.14 KB
/
publish-to-pypi.yml
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
36
37
38
39
40
41
42
43
44
name: PyPI Publish
on:
push:
branches-ignore:
- 'develop'
- 'feature/*'
tags:
- '**'
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@master
# Setup Python
- name: Set up Python 3.12
uses: actions/setup-python@v1
with:
python-version: 3.12
# Install Dependencies
- name: Install pypa/build
run: >-
python -m
pip install
build wheel setuptools
--user
# Build Package
- name: Build a binary wheel and a source tarball
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: >-
python
setup.py
bdist_wheel
sdist
# Publish
- name: Publish distribution 📦 to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_DJANGO_MINIO_BACKEND }}