-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (40 loc) · 943 Bytes
/
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
name: Test, release
on:
push:
branches: [main]
tags: "v*.*.*"
workflow_dispatch:
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: pip
- name: Install bmdf
run: pip install -e .
- name: Verify README TOC is up to date
run: |
mktoc
git diff --exit-code
- name: Verify bash functions work
run: |
wcl() { wc -l "$@"; }
export -f wcl
export SHELL
bmdf seq 10 '|' wcl
- name: Verify README examples are up to date
run: |
mdcmd
git diff --exit-code
- name: Release
if: startsWith(github.ref, 'refs/tags/')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
pip install build twine
python -m build
twine upload dist/*