Skip to content

Commit fee0842

Browse files
committed
updates suggested by copilot
1 parent 9530ea4 commit fee0842

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: PyPI release
2+
23
on:
34
workflow_dispatch:
45
pull_request:
@@ -23,14 +24,15 @@ jobs:
2324
run: |
2425
pip install build
2526
python -m build
27+
ls dist # List the contents of the dist directory
2628
- name: Check the sdist installs and imports
2729
run: |
2830
mkdir -p test-sdist
2931
cd test-sdist
3032
python -m venv venv-sdist
3133
venv-sdist/bin/python -m pip install ../dist/causalpy*.tar.gz
3234
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__)"
3436
cd ..
3537
- name: Check the bdist installs and imports
3638
run: |
@@ -39,12 +41,13 @@ jobs:
3941
python -m venv venv-bdist
4042
venv-bdist/bin/python -m pip install ../dist/CausalPy*.whl
4143
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__)"
4345
cd ..
4446
- uses: actions/upload-artifact@v4
4547
with:
4648
name: artifact
4749
path: dist/*
50+
4851
test:
4952
name: Upload to Test PyPI
5053
permissions:
@@ -72,7 +75,7 @@ jobs:
7275
python -m venv venv-test-pypi
7376
venv-test-pypi/bin/python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple causalpy
7477
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 }}'"
7679
7780
publish:
7881
environment: release

0 commit comments

Comments
 (0)