@vavt/github-action-test 0.7.1 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/latest.yml +42 -17
- package/CHANGELOG.md +25 -1
- package/package.json +1 -1
|
@@ -99,6 +99,8 @@ jobs:
|
|
|
99
99
|
&& IFS= read -r -d '' SUBJECT \
|
|
100
100
|
&& IFS= read -r -d '' BODY; do
|
|
101
101
|
[ -z "${FULL_HASH:-}" ] && continue
|
|
102
|
+
FULL_HASH="$(printf '%s' "${FULL_HASH}" | tr -d '\r\n[:space:]')"
|
|
103
|
+
[ -z "${FULL_HASH}" ] && continue
|
|
102
104
|
SUBJECT="$(printf '%s' "${SUBJECT}" | sed -E 's/^[[:space:]]+|[[:space:]]+$//g')"
|
|
103
105
|
[ -z "${SUBJECT}" ] && continue
|
|
104
106
|
|
|
@@ -129,9 +131,26 @@ jobs:
|
|
|
129
131
|
if [ -z "${CLEAN_SUBJECT}" ]; then
|
|
130
132
|
CLEAN_SUBJECT="${SUBJECT}"
|
|
131
133
|
fi
|
|
134
|
+
CLEAN_SUBJECT="$(printf '%s' "${CLEAN_SUBJECT}" \
|
|
135
|
+
| tr '\r\n' ' ' \
|
|
136
|
+
| sed -E 's/[[:space:]]+/ /g; s/^[[:space:]]+|[[:space:]]+$//g')"
|
|
137
|
+
|
|
138
|
+
ISSUE_INFO="$(printf '%s\n%s\n' "${SUBJECT}" "${BODY}" \
|
|
139
|
+
| perl -ne 'while(/(?:^|[^A-Za-z0-9_])#([0-9]+)\b/g){print "#$1\n"}' \
|
|
140
|
+
| awk '!seen[$0]++' \
|
|
141
|
+
| paste -sd ' ' -)"
|
|
142
|
+
ISSUE_SUFFIX=""
|
|
143
|
+
if [ -n "${ISSUE_INFO}" ]; then
|
|
144
|
+
ISSUE_SUFFIX=" ${ISSUE_INFO}"
|
|
145
|
+
fi
|
|
132
146
|
|
|
133
147
|
SHORT_HASH="$(printf '%s' "${FULL_HASH}" | cut -c1-7)"
|
|
134
|
-
printf -- '- %s ([%s](%s/commit/%s))\n'
|
|
148
|
+
printf -- '- %s ([commit %s](%s/commit/%s))%s\n' \
|
|
149
|
+
"${CLEAN_SUBJECT}" \
|
|
150
|
+
"${SHORT_HASH}" \
|
|
151
|
+
"${REPO_URL}" \
|
|
152
|
+
"${FULL_HASH}" \
|
|
153
|
+
"${ISSUE_SUFFIX}" >> "${TARGET_FILE}"
|
|
135
154
|
|
|
136
155
|
BODY_CLEAN="$(printf '%s\n' "${BODY}" \
|
|
137
156
|
| sed 's/\r$//' \
|
|
@@ -141,11 +160,27 @@ jobs:
|
|
|
141
160
|
if [ -n "${BODY_CLEAN}" ]; then
|
|
142
161
|
while IFS= read -r BODY_LINE; do
|
|
143
162
|
[ -z "${BODY_LINE}" ] && continue
|
|
144
|
-
printf '
|
|
163
|
+
BODY_LINE="$(printf '%s' "${BODY_LINE}" \
|
|
164
|
+
| tr '\r\n' ' ' \
|
|
165
|
+
| sed -E 's/[[:space:]]+/ /g; s/^[[:space:]]+|[[:space:]]+$//g')"
|
|
166
|
+
[ -z "${BODY_LINE}" ] && continue
|
|
167
|
+
if printf '%s' "${BODY_LINE}" | grep -Eiq '^(re|ref|refs|close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved)[:[:space:]]*(#[0-9]+([,[:space:]]+#[0-9]+)*)$'; then
|
|
168
|
+
continue
|
|
169
|
+
fi
|
|
170
|
+
if printf '%s' "${BODY_LINE}" | grep -Eq '^(issues?:)?[[:space:]]*(#[0-9]+([,[:space:]]+#[0-9]+)*)$'; then
|
|
171
|
+
continue
|
|
172
|
+
fi
|
|
173
|
+
if printf '%s' "${BODY_LINE}" | grep -Eiq '^BREAKING[[:space:]]+CHANGE:'; then
|
|
174
|
+
printf ' - **%s**\n' "${BODY_LINE}" >> "${TARGET_FILE}"
|
|
175
|
+
else
|
|
176
|
+
printf ' - %s\n' "${BODY_LINE}" >> "${TARGET_FILE}"
|
|
177
|
+
fi
|
|
145
178
|
done <<< "${BODY_CLEAN}"
|
|
146
179
|
fi
|
|
147
180
|
|
|
148
181
|
printf '\n' >> "${TARGET_FILE}"
|
|
182
|
+
# Do not use `-z` here. The format already uses NUL separators,
|
|
183
|
+
# and combining both introduces extra empty fields that can shift parsing.
|
|
149
184
|
done < <(git log "${RANGE}" --no-merges --format='%H%x00%s%x00%b%x00' || true)
|
|
150
185
|
|
|
151
186
|
write_section() {
|
|
@@ -172,25 +207,15 @@ jobs:
|
|
|
172
207
|
|
|
173
208
|
grep -vF "${MARKER}" CHANGELOG.md \
|
|
174
209
|
| sed '/^# Changelog$/d; /^All notable changes to this project will be documented in this file\.$/d' \
|
|
175
|
-
> /tmp/changelog-
|
|
176
|
-
|
|
177
|
-
FIRST_SECTION_LINE="$(grep -n '^## ' /tmp/changelog-base.md | head -n1 | cut -d: -f1 || true)"
|
|
178
|
-
|
|
179
|
-
if [ -n "${FIRST_SECTION_LINE}" ]; then
|
|
180
|
-
head -n "$((FIRST_SECTION_LINE - 1))" /tmp/changelog-base.md > /tmp/changelog-prefix.md
|
|
181
|
-
tail -n "+${FIRST_SECTION_LINE}" /tmp/changelog-base.md > /tmp/changelog-sections.md
|
|
182
|
-
else
|
|
183
|
-
cp /tmp/changelog-base.md /tmp/changelog-prefix.md
|
|
184
|
-
: > /tmp/changelog-sections.md
|
|
185
|
-
fi
|
|
210
|
+
> /tmp/changelog-existing.raw.md || true
|
|
211
|
+
sed '/./,$!d' /tmp/changelog-existing.raw.md > /tmp/changelog-existing.md
|
|
186
212
|
|
|
187
213
|
{
|
|
188
|
-
|
|
189
|
-
printf '\n%s\n\n' "${MARKER}"
|
|
214
|
+
printf '%s\n\n' "${MARKER}"
|
|
190
215
|
cat /tmp/release-entry.md
|
|
191
|
-
if [ -s /tmp/changelog-
|
|
216
|
+
if [ -s /tmp/changelog-existing.md ]; then
|
|
192
217
|
printf '\n'
|
|
193
|
-
cat /tmp/changelog-
|
|
218
|
+
cat /tmp/changelog-existing.md
|
|
194
219
|
fi
|
|
195
220
|
} > /tmp/CHANGELOG.md
|
|
196
221
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,37 @@
|
|
|
1
|
+
<!-- next-release -->
|
|
2
|
+
|
|
3
|
+
## 0.7.2 (2026-03-01)
|
|
1
4
|
|
|
5
|
+
### Others
|
|
2
6
|
|
|
7
|
+
- 长的描述 BREAKING CHANGE: 破坏的提交 re #4 ([commit ci(acti](https://github.com/imzbf/github-action-test/commit/ci(action):简短的介绍)) #4
|
|
3
8
|
|
|
4
9
|
|
|
10
|
+
**Full Changelog**: [v0.7.1...v0.7.2](https://github.com/imzbf/github-action-test/compare/v0.7.1...v0.7.2)
|
|
5
11
|
|
|
12
|
+
---
|
|
6
13
|
|
|
14
|
+
## 0.7.1 (2026-03-01)
|
|
7
15
|
|
|
16
|
+
### Features
|
|
8
17
|
|
|
18
|
+
- 简短的介绍 ([
|
|
19
|
+
19236c5](https://github.com/imzbf/github-action-test/commit/
|
|
20
|
+
19236c5852bfb9e69fdbe5df23aa6123c228977c))
|
|
21
|
+
比较长的说明
|
|
22
|
+
BREAKING CHANGE: 不兼容的内容
|
|
23
|
+
re #2
|
|
9
24
|
|
|
10
|
-
|
|
25
|
+
### Others
|
|
26
|
+
|
|
27
|
+
- ci: cHANGELOG 现在会记录 commit 正文 ([
|
|
28
|
+
ab2bbab](https://github.com/imzbf/github-action-test/commit/
|
|
29
|
+
ab2bbabfe240ea3a377586f4701f63dba8e907d2))
|
|
30
|
+
re #3
|
|
31
|
+
|
|
32
|
+
**Full Changelog**: [v0.6.0...v0.7.1](https://github.com/imzbf/github-action-test/compare/v0.6.0...v0.7.1)
|
|
33
|
+
|
|
34
|
+
---
|
|
11
35
|
|
|
12
36
|
## 0.6.0 (2026-03-01)
|
|
13
37
|
|