-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (35 loc) · 968 Bytes
/
pypi-release.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
name: PyPI - Release
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+*"
env:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
jobs:
build_and_publish:
runs-on: ubuntu-22.04
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Extract version
run: echo "BIOSETS_VERSION=$(python setup.py --version)" >> $GITHUB_ENV
- name: Build package
run: |
python setup.py sdist bdist_wheel
- name: Publish to PyPI
run: |
python -m twine upload dist/* --non-interactive
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}