-
Notifications
You must be signed in to change notification settings - Fork 14
69 lines (63 loc) · 1.77 KB
/
python_build.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Python build
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
cancel-in-progress: true
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: "0 4 * * MON"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.12"]
env:
TZ: Europe/Berlin
FORCE_COLOR: true
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Update pip etc.
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build twine
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Build sdist
run: python -m build --sdist
- name: Check sdist
run: twine check --strict dist/*
- name: Install sdist
run: python -m pip install ./dist/pybv-*
- name: Clean up working directory
run: rm -rf ./*
- name: Try importing pybv
run: python -c 'import pybv; print(pybv.__version__)'
- name: Remove sdist install
run: python -m pip uninstall -y pybv
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Build wheel
run: python -m build --wheel
- name: Check wheel
run: twine check --strict dist/*
- name: Install wheel
run: python -m pip install ./dist/pybv-*.whl
- name: Clean up working directory
run: rm -rf ./*
- name: Try importing pybv
run: python -c 'import pybv; print(pybv.__version__)'
- name: Remove wheel install
run: python -m pip uninstall -y pybv