forked from axnsan12/drf-yasg
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.08 KB
/
publish.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
name: Publish
on:
workflow_dispatch:
push:
tags:
- "*.*.*"
jobs:
publish:
name: Publish the package on pypi
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v2
# This is the version of python used to package the code. The unit
# tests will have run against python 3.6, 3.7 etc ensuring
# compatibility with those runtimes.
# https://github.com/axnsan12/drf-yasg/pull/741#discussion_r713297594
- name: Set the python version
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Install dependencies
uses: ./.github/actions/install
with:
python-version: 3.8
- name: Install builders for publishing
run: pip install -r requirements/publish.txt
- name: Build the distributions
run: python setup.py sdist bdist_wheel
- name: Publish the package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}