modified .github/workflows/release.yml +13 -4
| @@ -1,9 +1,8 @@ |
| 1 | 1 | name: Release |
| 2 | 2 | |
| 3 | | -# Publishes a release with the cross-compiled binaries whenever a tag v* is |
| 4 | | -# pushed — what ./01-release.tag.sh does at its last line. The binaries are |
| 5 | | -# built by ./02-build-releases.sh, the same script one runs on a laptop, so a |
| 6 | | -# local build and a published one are byte-for-byte the same pipeline. |
| 3 | +# Publishes a release whenever a tag v* is pushed — what ./01-release.tag.sh |
| 4 | +# does at its last line. Nothing is built: this repository ships no binaries, |
| 5 | +# the release only marks the tagged commit and carries the tag's message. |
| 7 | 6 | # |
| 8 | 7 | # Rickub runs this as an ordinary GitHub Actions workflow. Two platform facts |
| 9 | 8 | # matter here: the job's GITHUB_TOKEN is the ONLY credential the release API |
| @@ -36,6 +35,16 @@ jobs: |
| 36 | 35 | # from the annotated tag's message. |
| 37 | 36 | fetch-depth: 0 |
| 38 | 37 | |
| 38 | + # actions/checkout can leave a lightweight copy of the tag behind, which |
| 39 | + # has no message; fetching it again restores the annotated tag. |
| 40 | + - name: Release notes from the tag message |
| 41 | + id: notes |
| 42 | + run: | |
| 43 | + git fetch --force origin "refs/tags/${GITHUB_REF_NAME}:refs/tags/${GITHUB_REF_NAME}" |
| 44 | + path="${RUNNER_TEMP}/notes.md" |
| 45 | + git tag -l --format='%(contents)' "${GITHUB_REF_NAME}" > "${path}" |
| 46 | + echo "path=${path}" >> "${GITHUB_OUTPUT}" |
| 47 | + |
| 39 | 48 | - name: Publish the release |
| 40 | 49 | uses: softprops/action-gh-release@v2 |
| 41 | 50 | with: |
| @@ -1,9 +1,8 @@ |
| 1 | name: Release | 1 | name: Release |
| 2 | | 2 | |
| 3 | -# Publishes a release with the cross-compiled binaries whenever a tag v* is | 3 | +# Publishes a release whenever a tag v* is pushed — what ./01-release.tag.sh |
| 4 | -# pushed — what ./01-release.tag.sh does at its last line. The binaries are | 4 | +# does at its last line. Nothing is built: this repository ships no binaries, |
| 5 | -# built by ./02-build-releases.sh, the same script one runs on a laptop, so a | 5 | +# the release only marks the tagged commit and carries the tag's message. |
| 6 | -# local build and a published one are byte-for-byte the same pipeline. | | |
| 7 | # | 6 | # |
| 8 | # Rickub runs this as an ordinary GitHub Actions workflow. Two platform facts | 7 | # Rickub runs this as an ordinary GitHub Actions workflow. Two platform facts |
| 9 | # matter here: the job's GITHUB_TOKEN is the ONLY credential the release API | 8 | # matter here: the job's GITHUB_TOKEN is the ONLY credential the release API |
| @@ -36,6 +35,16 @@ jobs: |
| 36 | # from the annotated tag's message. | 35 | # from the annotated tag's message. |
| 37 | fetch-depth: 0 | 36 | fetch-depth: 0 |
| 38 | | 37 | |
| | 38 | + # actions/checkout can leave a lightweight copy of the tag behind, which |
| | 39 | + # has no message; fetching it again restores the annotated tag. |
| | 40 | + - name: Release notes from the tag message |
| | 41 | + id: notes |
| | 42 | + run: | |
| | 43 | + git fetch --force origin "refs/tags/${GITHUB_REF_NAME}:refs/tags/${GITHUB_REF_NAME}" |
| | 44 | + path="${RUNNER_TEMP}/notes.md" |
| | 45 | + git tag -l --format='%(contents)' "${GITHUB_REF_NAME}" > "${path}" |
| | 46 | + echo "path=${path}" >> "${GITHUB_OUTPUT}" |
| | 47 | + |
| 39 | - name: Publish the release | 48 | - name: Publish the release |
| 40 | uses: softprops/action-gh-release@v2 | 49 | uses: softprops/action-gh-release@v2 |
| 41 | with: | 50 | with: |
modified 01-release.tag.sh +2 -2
| @@ -3,8 +3,8 @@ |
| 3 | 3 | 1. Update TAG and ABOUT in release.env |
| 4 | 4 | 2. Run this script: ./01-release.tag.sh (commit, push, tag, push the tag) |
| 5 | 5 | 3. Watch the "Release" workflow on Rickub (Actions tab): the tag push starts |
| 6 | | - it; it builds the binaries with ./02-build-releases.sh and publishes the |
| 7 | | - release with them, using the job's own token. No personal token is needed. |
| 6 | + it and publishes the release (no binaries, the tag message as notes), |
| 7 | + using the job's own token. No personal token is needed. |
| 8 | 8 | COMMENT |
| 9 | 9 | |
| 10 | 10 | # Without this, a failing step is ignored and the next one runs anyway. That is |
| @@ -3,8 +3,8 @@ |
| 3 | 1. Update TAG and ABOUT in release.env | 3 | 1. Update TAG and ABOUT in release.env |
| 4 | 2. Run this script: ./01-release.tag.sh (commit, push, tag, push the tag) | 4 | 2. Run this script: ./01-release.tag.sh (commit, push, tag, push the tag) |
| 5 | 3. Watch the "Release" workflow on Rickub (Actions tab): the tag push starts | 5 | 3. Watch the "Release" workflow on Rickub (Actions tab): the tag push starts |
| 6 | - it; it builds the binaries with ./02-build-releases.sh and publishes the | 6 | + it and publishes the release (no binaries, the tag message as notes), |
| 7 | - release with them, using the job's own token. No personal token is needed. | 7 | + using the job's own token. No personal token is needed. |
| 8 | COMMENT | 8 | COMMENT |
| 9 | | 9 | |
| 10 | # Without this, a failing step is ignored and the next one runs anyway. That is | 10 | # Without this, a failing step is ignored and the next one runs anyway. That is |
modified release.env +1 -1
| @@ -1,5 +1,5 @@ |
| 1 | 1 | # ./01-release.tag.sh commit, tag, push |
| 2 | | -TAG="v0.0.0" |
| 2 | +TAG="v0.0.1" |
| 3 | 3 | ABOUT="Mini Me" |
| 4 | 4 | OWNER="bots-garden" |
| 5 | 5 | REPO="mini-me-kit" |
| @@ -1,5 +1,5 @@ |
| 1 | # ./01-release.tag.sh commit, tag, push | 1 | # ./01-release.tag.sh commit, tag, push |
| 2 | -TAG="v0.0.0" | 2 | +TAG="v0.0.1" |
| 3 | ABOUT="Mini Me" | 3 | ABOUT="Mini Me" |
| 4 | OWNER="bots-garden" | 4 | OWNER="bots-garden" |
| 5 | REPO="mini-me-kit" | 5 | REPO="mini-me-kit" |