You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fd0d2e7
Browse filesBrowse the repository at this point in the historyBrowse files
ci(release): run the tag checks and the release upload from util/ scripts (#1967) (#2065)
Step 2 of #1967, first batch for create-release.yml: the shell its jobs
repeated moves into two stdlib-only scripts, with each step's env:, if:,
shell: and continue-on-error unchanged.
* util/release_tags.py check: "Check the release tags name this run's
commit" in github, pypi and conda; release_tags.py owner: "Check which
commit the version's tag names" in version_check. Both resolve the tag
through one function.
* util/release_upload.py: "Upload package to GitHub Release" in pypi and
conda.
* workflows.rst lists both scripts, and the interpreter each runs on.
tests/project/test_release_scripts_1967.py runs both against stand-in git
and gh, and runs the former shell on the same cases, requiring the same
status, output, $GITHUB_OUTPUT and calls. The #1634 tests now run the
steps' commands, and PUBLISHING_MARKERS matches the upload script.
echo "::error title=${tag} is not this run's commit (#1634)::${tag} resolves to '${tagged:-no commit}', but this run was created for ${run_commit}. Refusing to publish this tree under it: every artefact of a release comes from its tag's commit, so finish that release by re-running the run created for that commit."
575
-
exit 1
576
-
fi
577
-
echo "${tag} -> ${run_commit}"
578
-
done
553
+
run: python3 util/release_tags.py check
579
554
580
555
# #1634: a refusal is most likely the workflow-file rule quoted at "Mint
581
556
# the release App's token", which GitHub's 2023-11-02 changelog words more
echo "::error title=${tag} is not this run's commit (#1634)::${tag} resolves to '${tagged:-no commit}', but this run was created for ${run_commit}. Refusing to publish this tree under it: every artefact of a release comes from its tag's commit, so finish that release by re-running the run created for that commit."
echo "::error title=Nothing to upload::'${pattern}' matches no file, so ${PCAPKIT_RELEASE_TAG} would go without it."
893
-
exit 1
894
-
fi
895
-
name="${file##*/}"
896
-
state=""
897
-
while IFS=$'\t' read -r asset asset_state; do
898
-
[ "$asset" != "$name" ] || state="$asset_state"
899
-
done <<< "$published"
900
-
if [ "$state" = uploaded ]; then
901
-
echo "::notice title=${name} already on ${PCAPKIT_RELEASE_TAG}::Left as published (#1640): this run's rebuild is not byte-identical to it."
902
-
continue
903
-
fi
904
-
if [ -n "$state" ]; then
905
-
echo "::warning title=${name} uploaded again::${PCAPKIT_RELEASE_TAG} holds it in state '${state}', not 'uploaded' -- an upload that failed partway -- so it is deleted and this file uploaded in its place."
echo "::error title=${tag} is not this run's commit (#1634)::${tag} resolves to '${tagged:-no commit}', but this run was created for ${run_commit}. Refusing to publish this tree under it: every artefact of a release comes from its tag's commit, so finish that release by re-running the run created for that commit."
1012
-
exit 1
1013
-
fi
1014
-
echo "${tag} -> ${run_commit}"
1015
-
done
938
+
run: python3 util/release_tags.py check
1016
939
1017
940
# #888: the per-leg correctness fix. Uncached, per ``version_check``'s
echo "::error title=Nothing to upload::'${pattern}' matches no file, so ${PCAPKIT_RELEASE_TAG} would go without it."
1279
-
exit 1
1280
-
fi
1281
-
name="${file##*/}"
1282
-
state=""
1283
-
while IFS=$'\t' read -r asset asset_state; do
1284
-
[ "$asset" != "$name" ] || state="$asset_state"
1285
-
done <<< "$published"
1286
-
if [ "$state" = uploaded ]; then
1287
-
echo "::notice title=${name} already on ${PCAPKIT_RELEASE_TAG}::Left as published (#1640): this run's rebuild is not byte-identical to it."
1288
-
continue
1289
-
fi
1290
-
if [ -n "$state" ]; then
1291
-
echo "::warning title=${name} uploaded again::${PCAPKIT_RELEASE_TAG} holds it in state '${state}', not 'uploaded' -- an upload that failed partway -- so it is deleted and this file uploaded in its place."
0 commit comments