GeezerVison is showing github.com — start-pre-release: show the build info on the run's summary page · openlogix/.github@7503f42
File treeExpand file treeCollapse file tree Open diff view settings actions/start-pre-release
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .github/workflows/actions-test.yaml +5Lines changed: 5 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 60 | 60 | [ "$RELEASE_TAG" = "$today" ] && [ "$PACKAGE_TAG" = "${today//-/}" ] | 61 | 61 | [ "$REPO" = "$GITHUB_REPOSITORY" ] && [ "$REPO_COMMIT" = "$GITHUB_SHA" ] | 62 | 62 | [ "$OUT_RELEASE" = "$today" ] && [ "$OUT_PACKAGE" = "${today//-/}" ] | | 63 | + # The build info on the run's summary page. | | 64 | + grep -q '^## Build info$' "$GITHUB_STEP_SUMMARY" | | 65 | + grep -qF '| `package-name` | `test-package` |' "$GITHUB_STEP_SUMMARY" | | 66 | + grep -qF '| `test-version` | `1.2.3` |' "$GITHUB_STEP_SUMMARY" | | 67 | + grep -q '| `repo-commit` | \[`'"$GITHUB_SHA"'`\](' "$GITHUB_STEP_SUMMARY" | 63 | 68 |
| 64 | 69 | # -- read-build-info: the artifact from start-pre-release, the platform, | 65 | 70 | # -- and the environment. | |
Collapse file Copy file name to clipboardExpand all lines: CLAUDE.md +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -46,7 +46,7 @@ A workflow here that checks what no single repo's CI can see and reports problem | 46 | 46 |
| 47 | 47 | Action details: | 48 | 48 |
| 49 | | -- `start-pre-release`: the first job of a `build-pre-release` workflow, after checkout. `package-name`, `description`, `extra-fields` (optional JSON object, placed after the description). Today's tags (`yyyy-mm-dd`, `yyyymmdd`), fails if a stable release has that tag, writes `BUILD-INFO.json` (the standard fields: repo, branch, commit, tags, build time, workflow run) and uploads it as the `build-info` artifact; sets `RELEASE_TAG`, `PACKAGE_TAG`, `REPO`, `REPO_BRANCH`, `REPO_COMMIT` and outputs the two tags. | | 49 | +- `start-pre-release`: the first job of a `build-pre-release` workflow, after checkout. `package-name`, `description`, `extra-fields` (optional JSON object, placed after the description). Today's tags (`yyyy-mm-dd`, `yyyymmdd`), fails if a stable release has that tag, writes `BUILD-INFO.json` (the standard fields: repo, branch, commit, tags, build time, workflow run) and uploads it as the `build-info` artifact, and shows it on the run's summary page as a table of fields (values in code format, the commit linked; the website repo's `CLAUDE.md`, Shared CI, makes that a rule for every build workflow); sets `RELEASE_TAG`, `PACKAGE_TAG`, `REPO`, `REPO_BRANCH`, `REPO_COMMIT` and outputs the two tags. | 50 | 50 | - `read-build-info`: the platform build jobs and the release job. Downloads `BUILD-INFO.json`, optionally adds `target-platform` (`platform`), sets the same five variables. | 51 | 51 | - `publish-pre-release`: the release job's end. `title`, `links`, `engine-note` (`catalog` or `core`: the "Use it through Logix Engine" note; `release_text.py` holds the one copy of both texts), `content-file` (the repo's own Markdown), `about-bullets`, `files` (the packages). Writes `SHA256SUMS` and the release text in the standard structure (the website repo's `CLAUDE.md`, Release text is user facing), deletes a same-tag pre-release and its tag and makes it again from scratch with the tag at the built commit (fails over a stable release), uploads the files with `BUILD-INFO.json` and `SHA256SUMS`, then deletes older pre-releases by the policy. | 52 | 52 | - `actions/release-policy.sh`: the pre-release policy, the one place it's set (`PRERELEASE_KEEP=5`: pre-releases are daily, so each is deleted after about 5 days unless made stable). `publish-pre-release` applies it and states it in every release text. | |
Collapse file Copy file name to clipboardExpand all lines: README.md +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -36,7 +36,7 @@ Composite actions in [actions/](actions), and one reusable workflow, used from t | 36 | 36 |
| 37 | 37 | | Action | What it does | | 38 | 38 | | --- | --- | | 39 | | -| `start-pre-release` | A release workflow's start: today's tags, the stable-release check, `BUILD-INFO.json` | | | 39 | +| `start-pre-release` | A release workflow's start: today's tags, the stable-release check, `BUILD-INFO.json`, also shown on the run's summary page | | 40 | 40 | | `read-build-info` | Gets `BUILD-INFO.json` in a later job, with the platform, into env vars | | 41 | 41 | | `publish-pre-release` | A release workflow's end: checksums, the standard release text, the day's pre-release made again from scratch, and the cleanup | | 42 | 42 | | `check-platform` | Fails unless the runner has the given OS and architecture | | |
Collapse file Copy file name to clipboardExpand all lines: actions/start-pre-release/action.yaml +19-1Lines changed: 19 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,7 +4,8 @@ description: >- | 4 | 4 | tag (yyyy-mm-dd) and package tag (yyyymmdd), a check that no stable | 5 | 5 | release has that tag (a pre-release with it is replaced later, by | 6 | 6 | publish-pre-release), and BUILD-INFO.json, the build's description, | 7 | | - uploaded as the 'build-info' artifact for the other jobs (read-build-info). | | 7 | + uploaded as the 'build-info' artifact for the other jobs (read-build-info) | | 8 | + and shown as a table on the run's summary page. | 8 | 9 | Sets RELEASE_TAG, PACKAGE_TAG, REPO, REPO_BRANCH and REPO_COMMIT in the | 9 | 10 | environment, and the two tags as outputs. Run it after checking out the | 10 | 11 | repo. | | 75 | 76 | echo "release-tag=$release_tag" >> "$GITHUB_OUTPUT" | 76 | 77 | echo "package-tag=$package_tag" >> "$GITHUB_OUTPUT" | 77 | 78 |
| | 79 | + # The build info on the run's summary page too (the website repo's | | 80 | + # CLAUDE.md, Shared CI: every build workflow shows it there). | | 81 | + - name: Build info in the run's summary | | 82 | + shell: bash | | 83 | + run: | | | 84 | + set -euo pipefail | | 85 | + { | | 86 | + echo "## Build info" | | 87 | + echo | | 88 | + echo "| Field | Value |" | | 89 | + echo "| --- | --- |" | | 90 | + jq -r --arg server "${{ github.server_url }}" ' | | 91 | + to_entries[] | | | 92 | + if .key == "repo-commit" then "| `\(.key)` | [`\(.value)`](\($server)/\(env.REPO)/commit/\(.value)) |" | | 93 | + else "| `\(.key)` | `\(.value | tostring | gsub("\\|"; "\\|"))` |" end' BUILD-INFO.json | | 94 | + } >> "$GITHUB_STEP_SUMMARY" | | 95 | +
| 78 | 96 | - name: Upload the build info artifact | 79 | 97 | uses: actions/upload-artifact@v7 | 80 | 98 | with: | |
|