@@ -115,6 +115,7 @@ jobs:
115115 run : |
116116 docker run --name test build bash /project/.github/workflows/container_tests.sh
117117 docker cp test:/project/dist .
118+ docker cp test:/project/lockfiles .
118119 docker cp test:/project/cov.xml .
119120
120121 - name : Upload coverage to Codecov
@@ -131,30 +132,27 @@ jobs:
131132 context : .
132133 labels : ${{ steps.meta.outputs.labels }}
133134
134- - name : Check runtime
135+ - name : Test cli works in runtime image
135136 # check that the first tag can run with --version parameter
136- run : docker run $(echo ${{ steps.meta.outputs.tags }} | sed -e 's/\s.*$//') --version
137+ run : docker run $(echo ${{ steps.meta.outputs.tags }} | head -1) --version
138+
139+ - name : Test cli works in sdist installed in local python
140+ # ${GITHUB_REPOSITORY##*/} is the repo name without org
141+ # Replace this with the cli command if different to the repo name
142+ # (python3-pip-skeleton-cli replaces this with python3-pip-skeleton)
143+ run : pip install dist/*.gz && python3-pip-skeleton --version
137144
138145 - name : Upload build files
139146 uses : actions/upload-artifact@v3
140147 with :
141148 name : dist
142149 path : dist
143150
144- sdist :
145- needs : container
146- runs-on : ubuntu-latest
147-
148- steps :
149- - uses : actions/download-artifact@v3
150-
151- - name : Install sdist in a venv and check cli works
152- # ${GITHUB_REPOSITORY##*/} is the repo name without org
153- # Replace this with the cli command if different to the repo name
154- # (In the python3-pip-skeleton-cli this is already renamed)
155- run : |
156- pip install dist/*.gz
157- python3-pip-skeleton --version
151+ - name : Upload lock files
152+ uses : actions/upload-artifact@v3
153+ with :
154+ name : lockfiles
155+ path : lockfiles
158156
159157 release :
160158 # upload to PyPI and make a release on every tag
@@ -171,13 +169,14 @@ jobs:
171169 uses : softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5 # v0.1.14
172170 with :
173171 prerelease : ${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b') || contains(github.ref_name, 'rc') }}
174- files : dist/*
172+ files : |
173+ dist/
174+ lockfiles/
175175 generate_release_notes : true
176176 env :
177177 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
178178
179179 - name : Publish to PyPI
180- env :
181- TWINE_USERNAME : __token__
182- TWINE_PASSWORD : ${{ secrets.PYPI_TOKEN }}
183- run : pipx run twine upload dist/*.whl dist/*.tar.gz
180+ uses : pypa/gh-action-pypi-publish@release/v1
181+ with :
182+ password : ${{ secrets.PYPI_TOKEN }}
0 commit comments