diff options
-rw-r--r-- | .github/workflows/kit.yml | 3 | ||||
-rw-r--r-- | ci/download_gha_artifacts.py | 15 | ||||
-rw-r--r-- | howto.txt | 4 |
3 files changed, 15 insertions, 7 deletions
diff --git a/.github/workflows/kit.yml b/.github/workflows/kit.yml index bf57ec7d..437e7d31 100644 --- a/.github/workflows/kit.yml +++ b/.github/workflows/kit.yml @@ -50,6 +50,7 @@ jobs: - name: Upload wheels uses: actions/upload-artifact@v2 with: + name: dist path: ./wheelhouse/*.whl build_sdist: @@ -71,6 +72,7 @@ jobs: - name: Upload sdist uses: actions/upload-artifact@v2 with: + name: dist path: dist/*.tar.gz build_pypy: @@ -97,4 +99,5 @@ jobs: - name: Upload wheels uses: actions/upload-artifact@v2 with: + name: dist path: dist/*.whl diff --git a/ci/download_gha_artifacts.py b/ci/download_gha_artifacts.py index ac9d4790..5e86d243 100644 --- a/ci/download_gha_artifacts.py +++ b/ci/download_gha_artifacts.py @@ -49,9 +49,12 @@ if not os.path.exists(dest): os.chdir(dest) r = requests.get(f"https://api.github.com/repos/{repo_owner}/actions/artifacts") -latest = max(r.json()["artifacts"], key=lambda a: a["created_at"]) - -print(f"Artifacts created at {utc2local(latest['created_at'])}") -download_url(latest["archive_download_url"], temp_zip) -unpack_zipfile(temp_zip) -os.remove(temp_zip) +dists = [a for a in r.json()["artifacts"] if a["name"] == "dist"] +if not dists: + print(f"No recent dists!") +else: + latest = max(dists, key=lambda a: a["created_at"]) + print(f"Artifacts created at {utc2local(latest['created_at'])}") + download_url(latest["archive_download_url"], temp_zip) + unpack_zipfile(temp_zip) + os.remove(temp_zip) @@ -44,8 +44,10 @@ - ELSE: $ make publish - Kits: + - Manually trigger the kit GitHub Action + - https://github.com/nedbat/coveragepy/actions?query=workflow%3A%22Build+kits%22 - Download built kits from GitHub Actions: - $ make download_kits + $ make clean download_kits - examine the dist directory, and remove anything that looks malformed. - check the dist directory: $ python -m twine check dist/* |