-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.09 KB
/
ci.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
name: CI
on:
push:
branches: [ main ]
tags: [ "**" ]
pull_request:
branches: [ "**" ]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11']
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: 'requirements*.txt'
- run: pip install -e . -r requirements-ci.txt
- name: Set up README example tests
run: |
seq 10 > 1.txt
seq 10 -2 0 > 2.txt
- name: Verify README examples, TOC
run: |
mdcmd
mktoc
git diff --exit-code
- name: Release
if: startsWith(github.ref, 'refs/tags/') && matrix.python-version == '3.11'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
pip install setuptools twine wheel
python setup.py sdist bdist_wheel
twine upload dist/*