Skip to content

Commit 507652d

Browse files
authored
Merge pull request #8 from caltechlibrary/release/notes-at-publish-time
Remove notes-file from create-release
2 parents cd860b5 + a8e17e2 commit 507652d

4 files changed

Lines changed: 21 additions & 19 deletions

File tree

.github/actions/create-release/action.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ inputs:
1111
description: Release title. Defaults to the tag.
1212
required: false
1313
default: ""
14-
notes-file:
15-
description: >-
16-
Markdown file prepended to GitHub's generated notes. Use it for the one
17-
or two sentences a human wrote about this release.
18-
required: false
19-
default: ""
2014
target:
2115
description: >-
2216
Commit to tag. Defaults to HEAD. Tag the commit that already has the
@@ -49,15 +43,13 @@ runs:
4943
GH_TOKEN: ${{ inputs.token }}
5044
TAG: ${{ inputs.tag }}
5145
TITLE: ${{ inputs.title }}
52-
NOTES_FILE: ${{ inputs.notes-file }}
5346
TARGET: ${{ inputs.target }}
5447
ARTIFACTS: ${{ inputs.artifacts }}
5548
GENERATE_NOTES: ${{ inputs.generate-notes }}
5649
DRY_RUN: ${{ inputs.dry-run }}
5750
run: |
5851
ARGS=(--tag "$TAG")
5952
[ -n "$TITLE" ] && ARGS+=(--title "$TITLE")
60-
[ -n "$NOTES_FILE" ] && ARGS+=(--notes-file "$NOTES_FILE")
6153
[ -n "$TARGET" ] && ARGS+=(--target "$TARGET")
6254
[ "$GENERATE_NOTES" = "false" ] && ARGS+=(--no-generate-notes)
6355
[ "$DRY_RUN" = "true" ] && ARGS+=(--dry-run)

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,22 @@ what moved. See
1212

1313
## [Unreleased]
1414

15+
### Removed
16+
17+
- `create-release`'s `notes-file` input, and `--notes-file` from
18+
`bin/create-release.sh`. Notes are written when the draft is published: the
19+
release editor is a real text area with a preview, in front of the draft
20+
being reviewed, and whoever passes notes in is the same person about to open
21+
it. Passing them in also means collecting them in a `workflow_dispatch`
22+
input, which is a single-line box showing barely a phrase.
23+
24+
**Released as a minor by exception.** Removing an input is a major change by
25+
[ADR-0006](docs/decisions/0006-version-with-moving-major-tags.md). This
26+
input shipped in 1.3.0 earlier the same day, and the only consumer of the
27+
action is changing in lockstep to stop passing it, so no caller breaks. The
28+
exception holds while these actions are in heavy development and have no
29+
outside users; once they do, the rule applies as written.
30+
1531
## [1.3.0] - 2026-09-10
1632

1733
### Added

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,6 @@ your own deploy job, or use a `docs-*.yml` reusable workflow.
312312
| --- | --- | --- |
313313
| `tag` | — | Tag to create, e.g. `v1.2.3` (required) |
314314
| `title` | the tag | Release title |
315-
| `notes-file` | — | Markdown prepended to the generated notes |
316315
| `target` | `HEAD` | Commit to tag |
317316
| `artifacts` | — | Files to attach, one path per line |
318317
| `generate-notes` | `true` | Include GitHub's commit-derived notes |
@@ -324,6 +323,10 @@ checks the artifacts, and presses the button. Nothing here publishes, and
324323
nothing here decides a version — the caller has already bumped whatever holds
325324
it and committed that.
326325

326+
**Notes are written when the draft is published.** The draft opens with
327+
GitHub's generated commit list; whoever publishes it adds prose above that in
328+
the release editor.
329+
327330
`target` matters when the release follows a metadata regeneration. Tag the
328331
commit that has the regenerated files, not the one that only bumped the
329332
version, or the archive ships metadata describing the previous release.

bin/create-release.sh

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# decides a version -- the caller has already bumped whatever holds it and
88
# committed that, so this tags what is in front of it.
99
#
10-
# create-release.sh --tag v1.2.3 --notes-file notes.md --artifact dist/app.zip
10+
# create-release.sh --tag v1.2.3 --artifact dist/app.zip
1111
#
1212
# Authentication is not handled here. The caller is expected to have gh
1313
# authenticated already -- in CI that is GH_TOKEN, locally it is your own
@@ -17,7 +17,6 @@ set -euo pipefail
1717

1818
TAG=""
1919
TITLE=""
20-
NOTES_FILE=""
2120
TARGET=""
2221
DRY_RUN="false"
2322
GENERATE_NOTES="true"
@@ -30,7 +29,6 @@ create-release.sh -- tag a commit and open a draft GitHub release
3029
Options:
3130
--tag NAME tag to create, e.g. v1.2.3 (required)
3231
--title TEXT release title (default: the tag)
33-
--notes-file FILE Markdown prepended to the generated notes
3432
--target SHA commit to tag (default: HEAD)
3533
--artifact PATH file to attach, repeatable
3634
--no-generate-notes omit GitHub's commit-derived notes
@@ -43,7 +41,6 @@ while [ $# -gt 0 ]; do
4341
case "$1" in
4442
--tag) TAG="$2"; shift 2 ;;
4543
--title) TITLE="$2"; shift 2 ;;
46-
--notes-file) NOTES_FILE="$2"; shift 2 ;;
4744
--target) TARGET="$2"; shift 2 ;;
4845
--artifact) ARTIFACTS+=("$2"); shift 2 ;;
4946
--no-generate-notes) GENERATE_NOTES="false"; shift ;;
@@ -59,11 +56,6 @@ command -v gh >/dev/null || { echo "create-release: gh is not installed" >&2; ex
5956
[ -n "$TITLE" ] || TITLE="$TAG"
6057
[ -n "$TARGET" ] || TARGET="$(git rev-parse HEAD)"
6158

62-
if [ -n "$NOTES_FILE" ] && [ ! -f "$NOTES_FILE" ]; then
63-
echo "create-release: no such file: $NOTES_FILE" >&2
64-
exit 1
65-
fi
66-
6759
# An empty or missing artifact means the build silently produced nothing, which
6860
# is the failure worth catching -- a release with no files looks fine until
6961
# someone tries to download one.
@@ -83,7 +75,6 @@ fi
8375

8476
declare -a ARGS=("$TAG" --draft --title "$TITLE" --target "$TARGET")
8577
[ "$GENERATE_NOTES" = "true" ] && ARGS+=(--generate-notes)
86-
[ -n "$NOTES_FILE" ] && ARGS+=(--notes-file "$NOTES_FILE")
8778
for f in ${ARTIFACTS[@]+"${ARTIFACTS[@]}"}; do ARGS+=("$f"); done
8879

8980
echo "tag: $TAG"

0 commit comments

Comments
 (0)