3131 env :
3232 DOCKER_CLIENT_TIMEOUT : " 120"
3333 COMPOSE_HTTP_TIMEOUT : " 120"
34- PY_VER : " 3.8 "
34+ PY_VER : " 3.9 "
3535 IMAGE : " djtest"
3636 DISTRO : " alpine"
3737 steps :
5757 - py_ver : 3.8
5858 distro : alpine
5959 image : djbase
60+ - py_ver : 3.9
61+ distro : alpine
62+ image : djbase
6063 env :
6164 PY_VER : ${{matrix.py_ver}}
6265 DISTRO : ${{matrix.distro}}
@@ -83,11 +86,10 @@ jobs:
8386 path : " image-pharus-${{env.PHARUS_VERSION}}-py${{matrix.py_ver}}-\
8487 ${{matrix.distro}}.tar.gz"
8588 retention-days : 1
86- - if : matrix.py_ver == '3.8' && matrix.distro == 'alpine'
87- name : Add pip artifacts
89+ - name : Add pip artifacts
8890 uses : actions/upload-artifact@v2
8991 with :
90- name : pip-pharus-${{env.PHARUS_VERSION}}
92+ name : pip-pharus-${{env.PHARUS_VERSION}}-py${{matrix.py_ver}}
9193 path : dist
9294 retention-days : 1
9395 test :
99101 - py_ver : 3.8
100102 distro : alpine
101103 image : djbase
104+ - py_ver : 3.9
105+ distro : alpine
106+ image : djbase
102107 env :
103108 PY_VER : ${{matrix.py_ver}}
104109 DISTRO : ${{matrix.distro}}
@@ -164,10 +169,15 @@ jobs:
164169 uses : actions/download-artifact@v2
165170 with :
166171 name : image-pharus-${{env.PHARUS_VERSION}}-py3.8-alpine
167- - name : Fetch pip artifacts
172+ - name : Fetch 3.8 pip artifacts
173+ uses : actions/download-artifact@v2
174+ with :
175+ name : pip-pharus-${{env.PHARUS_VERSION}}-py3.8
176+ path : dist
177+ - name : Fetch 3.9 pip artifacts
168178 uses : actions/download-artifact@v2
169179 with :
170- name : pip-pharus-${{env.PHARUS_VERSION}}
180+ name : pip-pharus-${{env.PHARUS_VERSION}}-py3.8
171181 path : dist
172182 - name : Publish pip release
173183 run : |
@@ -180,23 +190,41 @@ jobs:
180190 run : |
181191 echo "PHARUS_WHEEL_PATH=$(ls dist/pharus-*.whl)" >> $GITHUB_ENV
182192 echo "PHARUS_SDIST_PATH=$(ls dist/pharus-*.tar.gz)" >> $GITHUB_ENV
183- - name : Upload pip wheel asset to release
193+ - name : Upload 3.8 pip wheel asset to release
184194 uses : actions/upload-release-asset@v1
185195 env :
186196 GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
187197 with :
188198 upload_url : ${{steps.create_gh_release.outputs.upload_url}}
189199 asset_path : ${{env.PHARUS_WHEEL_PATH}}
190- asset_name : pip-pharus-${{env.PHARUS_VERSION}}.whl
200+ asset_name : pip-pharus-${{env.PHARUS_VERSION}}-py3.8 .whl
191201 asset_content_type : application/zip
192- - name : Upload pip sdist asset to release
202+ - name : Upload 3.9 pip wheel asset to release
203+ uses : actions/upload-release-asset@v1
204+ env :
205+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
206+ with :
207+ upload_url : ${{steps.create_gh_release.outputs.upload_url}}
208+ asset_path : ${{env.PHARUS_WHEEL_PATH}}
209+ asset_name : pip-pharus-${{env.PHARUS_VERSION}}-py3.9.whl
210+ asset_content_type : application/zip
211+ - name : Upload 3.8 pip sdist asset to release
193212 uses : actions/upload-release-asset@v1
194213 env :
195214 GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
196215 with :
197216 upload_url : ${{steps.create_gh_release.outputs.upload_url}}
198217 asset_path : ${{env.PHARUS_SDIST_PATH}}
199- asset_name : pip-pharus-${{env.PHARUS_VERSION}}.tar.gz
218+ asset_name : pip-pharus-${{env.PHARUS_VERSION}}-py3.8.tar.gz
219+ asset_content_type : application/gzip
220+ - name : Upload 3.9 pip sdist asset to release
221+ uses : actions/upload-release-asset@v1
222+ env :
223+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
224+ with :
225+ upload_url : ${{steps.create_gh_release.outputs.upload_url}}
226+ asset_path : ${{env.PHARUS_SDIST_PATH}}
227+ asset_name : pip-pharus-${{env.PHARUS_VERSION}}-py3.9.tar.gz
200228 asset_content_type : application/gzip
201229 - name : Upload deploy docker environment
202230 uses : actions/upload-release-asset@v1
@@ -224,6 +252,9 @@ jobs:
224252 - py_ver : 3.8
225253 distro : alpine
226254 image : djbase
255+ - py_ver : 3.9
256+ distro : alpine
257+ image : djbase
227258 env :
228259 PY_VER : ${{matrix.py_ver}}
229260 DISTRO : ${{matrix.distro}}
@@ -248,10 +279,12 @@ jobs:
248279 docker load < "image-pharus-${PHARUS_VERSION}-py${PY_VER}-${DISTRO}.tar.gz"
249280 IMAGE=$(docker images --filter "reference=datajoint/*" --format "{{.Repository}}")
250281 TAG=$(docker images --filter "reference=datajoint/*" --format "{{.Tag}}")
251- docker push "${IMAGE}:${TAG}"
252- docker tag "${IMAGE}:${TAG}" "${IMAGE}:${TAG}-${GITHUB_SHA:0:7}"
253- docker push "${IMAGE}:${TAG}-${GITHUB_SHA:0:7}"
254- [ "$PY_VER" == "3.8" ] && [ "$DISTRO" == "alpine" ] \
282+ docker tag "${IMAGE}:${TAG}" "${IMAGE}:${TAG}-py${PY_VER}"
283+ docker push "${IMAGE}:${TAG}-py${PY_VER}"
284+ docker tag "${IMAGE}:${TAG}" "${IMAGE}:${TAG}-py${PY_VER}-${GITHUB_SHA:0:7}"
285+ docker push "${IMAGE}:${TAG}-py${PY_VER}-${GITHUB_SHA:0:7}"
286+ [ "$PY_VER" == "3.9" ] && [ "$DISTRO" == "alpine" ] \
287+ && docker push "${IMAGE}:${TAG}" \
255288 && docker tag "${IMAGE}:${TAG}" "${IMAGE}:latest" \
256289 && docker push "${IMAGE}:latest" \
257290 || echo "skipping 'latest' tag..."
0 commit comments