forked from Marx314/python-ubersmithclient
-
Notifications
You must be signed in to change notification settings - Fork 4
39 lines (37 loc) · 1.04 KB
/
release.yml
File metadata and controls
39 lines (37 loc) · 1.04 KB
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
name: release
on:
release:
types: [released, prereleased]
jobs:
build-and-publish-pypi:
permissions:
contents: read
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python_version: ["3.9"]
tox_env: ['latest']
steps:
- uses: actions/checkout@v3
- name: "Set up Python ${{ matrix.python_version }}"
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python_version }}
- name: Install dependencies
run: python -m pip install --upgrade pip
- name: Install building dependencies
run: pip install wheel tox
- name: Build venv
run: |
tox -e ${{ matrix.tox_env }} --notest
- name: Run
run: |
rm -rf dist || true
.tox/${{ matrix.tox_env }}/bin/python setup.py sdist bdist_wheel
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'release'
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}