🛟 Updated.
8aa3f0c parent: b5d857d modified
.github/workflows/release.yml +10 -2 | @@ -37,12 +37,20 @@ jobs: | ||
| 37 | 37 | |
| 38 | 38 | # actions/checkout can leave a lightweight copy of the tag behind, which |
| 39 | 39 | # has no message; fetching it again restores the annotated tag. |
| 40 | - - name: Release notes from the tag message | |
| 40 | + # RELEASE_NOTES.md (generated by 00-prepare-release.sh) says which Mini Me | |
| 41 | + # version the kits use; the tag message is appended, or used alone when | |
| 42 | + # the file is missing. | |
| 43 | + - name: Release notes | |
| 41 | 44 | id: notes |
| 42 | 45 | run: | |
| 43 | 46 | git fetch --force origin "refs/tags/${GITHUB_REF_NAME}:refs/tags/${GITHUB_REF_NAME}" |
| 44 | 47 | path="${RUNNER_TEMP}/notes.md" |
| 45 | - git tag -l --format='%(contents)' "${GITHUB_REF_NAME}" > "${path}" | |
| 48 | + : > "${path}" | |
| 49 | + if [ -f RELEASE_NOTES.md ]; then | |
| 50 | + cat RELEASE_NOTES.md >> "${path}" | |
| 51 | + printf '\n' >> "${path}" | |
| 52 | + fi | |
| 53 | + git tag -l --format='%(contents)' "${GITHUB_REF_NAME}" >> "${path}" | |
| 46 | 54 | echo "path=${path}" >> "${GITHUB_OUTPUT}" |
| 47 | 55 | |
| 48 | 56 | - name: Publish the release |
| @@ -37,12 +37,20 @@ jobs: | |||
| 37 | 37 | ||
| 38 | # actions/checkout can leave a lightweight copy of the tag behind, which | 38 | # actions/checkout can leave a lightweight copy of the tag behind, which |
| 39 | # has no message; fetching it again restores the annotated tag. | 39 | # has no message; fetching it again restores the annotated tag. |
| 40 | - - name: Release notes from the tag message | 40 | + # RELEASE_NOTES.md (generated by 00-prepare-release.sh) says which Mini Me |
| 41 | + # version the kits use; the tag message is appended, or used alone when | ||
| 42 | + # the file is missing. | ||
| 43 | + - name: Release notes | ||
| 41 | id: notes | 44 | id: notes |
| 42 | run: | | 45 | run: | |
| 43 | git fetch --force origin "refs/tags/${GITHUB_REF_NAME}:refs/tags/${GITHUB_REF_NAME}" | 46 | git fetch --force origin "refs/tags/${GITHUB_REF_NAME}:refs/tags/${GITHUB_REF_NAME}" |
| 44 | path="${RUNNER_TEMP}/notes.md" | 47 | path="${RUNNER_TEMP}/notes.md" |
| 45 | - git tag -l --format='%(contents)' "${GITHUB_REF_NAME}" > "${path}" | 48 | + : > "${path}" |
| 49 | + if [ -f RELEASE_NOTES.md ]; then | ||
| 50 | + cat RELEASE_NOTES.md >> "${path}" | ||
| 51 | + printf '\n' >> "${path}" | ||
| 52 | + fi | ||
| 53 | + git tag -l --format='%(contents)' "${GITHUB_REF_NAME}" >> "${path}" | ||
| 46 | echo "path=${path}" >> "${GITHUB_OUTPUT}" | 54 | echo "path=${path}" >> "${GITHUB_OUTPUT}" |
| 47 | 55 | ||
| 48 | - name: Publish the release | 56 | - name: Publish the release |
modified
00-prepare-release.sh +26 -1 | old mode 100755 | ||
| new mode 100644 | ||
| @@ -16,6 +16,9 @@ What it changes: | ||
| 16 | 16 | docker.io/<NAMESPACE>/<kit>:<PREVIOUS_TAG> -> :<TAG> (without the leading "v") |
| 17 | 17 | - README.md: |
| 18 | 18 | docker.io/<NAMESPACE>/<kit>:<any version> -> :<TAG>, RELEASE=<any version> -> RELEASE=<TAG> |
| 19 | + - RELEASE_NOTES.md (generated): | |
| 20 | + which Mini Me version the kits embed. It is committed by 01-release.tag.sh | |
| 21 | + and published as the body of the GitHub release by the Release workflow. | |
| 19 | 22 | COMMENT |
| 20 | 23 | |
| 21 | 24 | set -euo pipefail |
| @@ -75,6 +78,28 @@ perl -pi -e ' | ||
| 75 | 78 | s{^(RELEASE=)v?\d+\.\d+\.\d+[ \t]*$}{$1v$ENV{VERSION}}g; |
| 76 | 79 | ' README.md |
| 77 | 80 | |
| 78 | -echo "✅ Versions updated" | |
| 81 | +# Release notes: published by the Release workflow as the body of the release. | |
| 82 | +{ | |
| 83 | + echo "# ${TAG}" | |
| 84 | + echo | |
| 85 | + echo "## Mini Me version" | |
| 86 | + echo | |
| 87 | + echo "The kits of this release use **Mini Me v${MINI_ME_VERSION}** (\`mm\`)." | |
| 88 | + echo | |
| 89 | + echo "## Kits" | |
| 90 | + echo | |
| 91 | + echo "| Kit | Image | Mini Me |" | |
| 92 | + echo "| --- | --- | --- |" | |
| 93 | + for f in "${KITS[@]}"; do | |
| 94 | + name="$(basename "$(dirname "$f")")" | |
| 95 | + [ "${name}" = "." ] && name="$(basename "$f" .yaml)" | |
| 96 | + if grep -q 'mini-me@\|mm_version' "$f"; then mm="v${MINI_ME_VERSION}"; else mm="-"; fi | |
| 97 | + echo "| ${name} | \`docker.io/${NAMESPACE}/${name}:${VERSION}\` | ${mm} |" | |
| 98 | + done | |
| 99 | + echo | |
| 100 | + echo "Changes since ${PREVIOUS_TAG}: https://github.com/${OWNER:-bots-garden}/${REPO:-mini-me-kit}/compare/${PREVIOUS_TAG}...${TAG}" | |
| 101 | +} >RELEASE_NOTES.md | |
| 102 | + | |
| 103 | +echo "✅ Versions updated (RELEASE_NOTES.md generated)" | |
| 79 | 104 | git --no-pager diff --stat -- "${KITS[@]}" "${SBXENVS[@]}" README.md 2>/dev/null || true |
| 80 | 105 | echo "💡 Check the diff, then: ./01-release.tag.sh" |
| old mode 100755 | |||
| new mode 100644 | |||
| @@ -16,6 +16,9 @@ What it changes: | |||
| 16 | docker.io/<NAMESPACE>/<kit>:<PREVIOUS_TAG> -> :<TAG> (without the leading "v") | 16 | docker.io/<NAMESPACE>/<kit>:<PREVIOUS_TAG> -> :<TAG> (without the leading "v") |
| 17 | - README.md: | 17 | - README.md: |
| 18 | docker.io/<NAMESPACE>/<kit>:<any version> -> :<TAG>, RELEASE=<any version> -> RELEASE=<TAG> | 18 | docker.io/<NAMESPACE>/<kit>:<any version> -> :<TAG>, RELEASE=<any version> -> RELEASE=<TAG> |
| 19 | + - RELEASE_NOTES.md (generated): | ||
| 20 | + which Mini Me version the kits embed. It is committed by 01-release.tag.sh | ||
| 21 | + and published as the body of the GitHub release by the Release workflow. | ||
| 19 | COMMENT | 22 | COMMENT |
| 20 | 23 | ||
| 21 | set -euo pipefail | 24 | set -euo pipefail |
| @@ -75,6 +78,28 @@ perl -pi -e ' | |||
| 75 | s{^(RELEASE=)v?\d+\.\d+\.\d+[ \t]*$}{$1v$ENV{VERSION}}g; | 78 | s{^(RELEASE=)v?\d+\.\d+\.\d+[ \t]*$}{$1v$ENV{VERSION}}g; |
| 76 | ' README.md | 79 | ' README.md |
| 77 | 80 | ||
| 78 | -echo "✅ Versions updated" | 81 | +# Release notes: published by the Release workflow as the body of the release. |
| 82 | +{ | ||
| 83 | + echo "# ${TAG}" | ||
| 84 | + echo | ||
| 85 | + echo "## Mini Me version" | ||
| 86 | + echo | ||
| 87 | + echo "The kits of this release use **Mini Me v${MINI_ME_VERSION}** (\`mm\`)." | ||
| 88 | + echo | ||
| 89 | + echo "## Kits" | ||
| 90 | + echo | ||
| 91 | + echo "| Kit | Image | Mini Me |" | ||
| 92 | + echo "| --- | --- | --- |" | ||
| 93 | + for f in "${KITS[@]}"; do | ||
| 94 | + name="$(basename "$(dirname "$f")")" | ||
| 95 | + [ "${name}" = "." ] && name="$(basename "$f" .yaml)" | ||
| 96 | + if grep -q 'mini-me@\|mm_version' "$f"; then mm="v${MINI_ME_VERSION}"; else mm="-"; fi | ||
| 97 | + echo "| ${name} | \`docker.io/${NAMESPACE}/${name}:${VERSION}\` | ${mm} |" | ||
| 98 | + done | ||
| 99 | + echo | ||
| 100 | + echo "Changes since ${PREVIOUS_TAG}: https://github.com/${OWNER:-bots-garden}/${REPO:-mini-me-kit}/compare/${PREVIOUS_TAG}...${TAG}" | ||
| 101 | +} >RELEASE_NOTES.md | ||
| 102 | + | ||
| 103 | +echo "✅ Versions updated (RELEASE_NOTES.md generated)" | ||
| 79 | git --no-pager diff --stat -- "${KITS[@]}" "${SBXENVS[@]}" README.md 2>/dev/null || true | 104 | git --no-pager diff --stat -- "${KITS[@]}" "${SBXENVS[@]}" README.md 2>/dev/null || true |
| 80 | echo "💡 Check the diff, then: ./01-release.tag.sh" | 105 | echo "💡 Check the diff, then: ./01-release.tag.sh" |
modified
release.env +3 -3 | @@ -1,8 +1,8 @@ | ||
| 1 | 1 | # ./01-release.tag.sh commit, tag, push |
| 2 | -MINI_ME_VERSION="1.0.4" | |
| 3 | -PREVIOUS_TAG="v0.1.1" | |
| 2 | +MINI_ME_VERSION="1.0.5" | |
| 3 | +PREVIOUS_TAG="v0.1.2" | |
| 4 | 4 | |
| 5 | -TAG="v0.1.2" | |
| 5 | +TAG="v0.1.3" | |
| 6 | 6 | ABOUT="Mini Me" |
| 7 | 7 | OWNER="bots-garden" |
| 8 | 8 | REPO="mini-me-kit" |
| @@ -1,8 +1,8 @@ | |||
| 1 | # ./01-release.tag.sh commit, tag, push | 1 | # ./01-release.tag.sh commit, tag, push |
| 2 | -MINI_ME_VERSION="1.0.4" | 2 | +MINI_ME_VERSION="1.0.5" |
| 3 | -PREVIOUS_TAG="v0.1.1" | 3 | +PREVIOUS_TAG="v0.1.2" |
| 4 | 4 | ||
| 5 | -TAG="v0.1.2" | 5 | +TAG="v0.1.3" |
| 6 | ABOUT="Mini Me" | 6 | ABOUT="Mini Me" |
| 7 | OWNER="bots-garden" | 7 | OWNER="bots-garden" |
| 8 | REPO="mini-me-kit" | 8 | REPO="mini-me-kit" |