File tree Expand file tree Collapse file tree 2 files changed +76
-9
lines changed Expand file tree Collapse file tree 2 files changed +76
-9
lines changed Original file line number Diff line number Diff line change 1+ name : Publish to PyPI - Test Wheels
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+ build_and_test_wheels :
7+ runs-on : ubuntu-latest
8+ environment : release
9+ strategy :
10+ matrix :
11+ python-version : ["3.12"]
12+
13+ steps :
14+
15+ - name : Checkout
16+ uses : actions/checkout@v4
17+ with :
18+ # Need this to get version number from last tag
19+ fetch-depth : 0
20+
21+ - name : Set up Python ${{ matrix.python-version }}
22+ uses : actions/setup-python@v6
23+ with :
24+ python-version : ${{ matrix.python-version }}
25+
26+ - name : Build sdist and wheel
27+ run : >
28+ export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) &&
29+ pipx run build
30+
31+ - name : Check for packaging errors
32+ run : pipx run twine check --strict dist/*
33+
34+ - name : Install produced wheel
35+ run : pip install dist/*.whl
36+
37+ - name : Test module is importable using the installed wheel - 1
38+ run : python -c "import save_and_restore_api"
39+
40+ - name : Test module is importable using the installed wheel - 2
41+ run : python -c "from save_and_restore_api import SaveRestoreAPI"
42+
43+ - name : Test module is importable using the installed wheel - 3
44+ run : python -c "from save_and_restore_api.aio import SaveRestoreAPI"
45+
46+ - name : Test if save-and-restore tools can be started
47+ run : save-and-restore -h
Original file line number Diff line number Diff line change 11name : Publish to PyPI
22
33on :
4- release :
5- types : [created]
6- branches :
7- - main
4+ release :
5+ types : [created]
6+ branches :
7+ - main
88
99jobs :
10- upload :
10+ build_and_upload_to_pypi :
1111 runs-on : ubuntu-latest
1212 environment : release
13+ strategy :
14+ matrix :
15+ python-version : ["3.12"]
1316
1417 steps :
15- - name : Download dist artifact
16- uses : actions/download-artifact@v4
18+
19+ - name : Checkout
20+ uses : actions/checkout@v4
21+ with :
22+ # Need this to get version number from last tag
23+ fetch-depth : 0
24+
25+ - name : Set up Python ${{ matrix.python-version }}
26+ uses : actions/setup-python@v6
1727 with :
18- name : dist
19- path : dist
28+ python-version : ${{ matrix.python-version }}
29+
30+ - name : Build sdist and wheel
31+ run : >
32+ export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) &&
33+ pipx run build
34+
35+ - name : Check for packaging errors
36+ run : pipx run twine check --strict dist/*
37+
38+ - name : Install produced wheel
39+ run : pip install dist/*.whl
2040
2141 - name : Publish to PyPI using trusted publishing
2242 uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments