@@ -115,6 +115,7 @@ jobs:
115
115
run : |
116
116
docker run --name test build bash /project/.github/workflows/container_tests.sh
117
117
docker cp test:/project/dist .
118
+ docker cp test:/project/lockfiles .
118
119
docker cp test:/project/cov.xml .
119
120
120
121
- name : Upload coverage to Codecov
@@ -131,30 +132,27 @@ jobs:
131
132
context : .
132
133
labels : ${{ steps.meta.outputs.labels }}
133
134
134
- - name : Check runtime
135
+ - name : Test cli works in runtime image
135
136
# 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
137
144
138
145
- name : Upload build files
139
146
uses : actions/upload-artifact@v3
140
147
with :
141
148
name : dist
142
149
path : dist
143
150
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
158
156
159
157
release :
160
158
# upload to PyPI and make a release on every tag
@@ -171,13 +169,14 @@ jobs:
171
169
uses : softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5 # v0.1.14
172
170
with :
173
171
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/
175
175
generate_release_notes : true
176
176
env :
177
177
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
178
178
179
179
- 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