-
Notifications
You must be signed in to change notification settings - Fork 111
49 lines (42 loc) · 1.04 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
45
46
47
48
49
name: Publish to PyPI
on:
push:
tags:
- '*'
paths:
- '.github/workflows/publish_to_pypi.yml'
- 'CMakeLists.txt'
- 'cmake/**'
- 'sherpa/csrc/**'
- 'sherpa/cpp_api/**'
- 'sherpa/python/**'
concurrency:
group: pypi-${{ github.ref }}
cancel-in-progress: true
jobs:
pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Python dependencies
shell: bash
run: |
python3 -m pip install --upgrade pip
python3 -m pip install wheel twine setuptools
- name: Build
shell: bash
run: |
python3 setup.py sdist
ls -l dist/*
- name: Publish wheels to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload dist/k2-sherpa-*.tar.gz