1
1
name : PyPI release
2
+
2
3
on :
3
4
workflow_dispatch :
4
5
pull_request :
@@ -23,14 +24,15 @@ jobs:
23
24
run : |
24
25
pip install build
25
26
python -m build
27
+ ls dist # List the contents of the dist directory
26
28
- name : Check the sdist installs and imports
27
29
run : |
28
30
mkdir -p test-sdist
29
31
cd test-sdist
30
32
python -m venv venv-sdist
31
33
venv-sdist/bin/python -m pip install ../dist/causalpy*.tar.gz
32
34
echo "Checking import and version number (on release)"
33
- venv-sdist/bin/python -c "import causalpy; assert causalpy.__version__ == '${{ github.ref_name }}' if '${{ github.ref_type }}' == 'tag' else causalpy.__version__; print(causalpy.__version__)"
35
+ venv-sdist/bin/python -c "import causalpy; assert causalpy.__version__ == '${{ github.ref_name }}' if '${{ github.ref_type }}' == 'tag' else causalpy.__version__; print(causalpy.__version__)"
34
36
cd ..
35
37
- name : Check the bdist installs and imports
36
38
run : |
@@ -39,12 +41,13 @@ jobs:
39
41
python -m venv venv-bdist
40
42
venv-bdist/bin/python -m pip install ../dist/CausalPy*.whl
41
43
echo "Checking import and version number (on release)"
42
- venv-bdist/bin/python -c "import causalpy; assert causalpy.__version__ == '${{ github.ref_name }}' if '${{ github.ref_type }}' == 'tag' else causalpy.__version__; print(causalpy.__version__)"
44
+ venv-bdist/bin/python -c "import causalpy; assert causalpy.__version__ == '${{ github.ref_name }}' if '${{ github.ref_type }}' == 'tag' else causalpy.__version__; print(causalpy.__version__)"
43
45
cd ..
44
46
- uses : actions/upload-artifact@v4
45
47
with :
46
48
name : artifact
47
49
path : dist/*
50
+
48
51
test :
49
52
name : Upload to Test PyPI
50
53
permissions :
72
75
python -m venv venv-test-pypi
73
76
venv-test-pypi/bin/python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple causalpy
74
77
echo "Checking import and version number"
75
- venv-test-pypi/bin/python -c "import causalpy; assert causalpy.__version__ == '${{ github.ref_name }}'"
78
+ venv-test-pypi/bin/python -c "import causalpy; assert causalpy.__version__ == '${{ github.ref_name }}'"
76
79
77
80
publish :
78
81
environment : release
0 commit comments