@vavt/github-action-test 0.7.1 → 0.7.2
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 +41 -18
- package/CHANGELOG.md +15 -4
- 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,12 +160,26 @@ 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}"
|
|
149
|
-
done < <(git log "${RANGE}" --no-merges --format='%H%x00%s%x00%b%x00' || true)
|
|
182
|
+
done < <(git log -z "${RANGE}" --no-merges --format='%H%x00%s%x00%b%x00' || true)
|
|
150
183
|
|
|
151
184
|
write_section() {
|
|
152
185
|
local title="$1"
|
|
@@ -172,25 +205,15 @@ jobs:
|
|
|
172
205
|
|
|
173
206
|
grep -vF "${MARKER}" CHANGELOG.md \
|
|
174
207
|
| 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
|
|
208
|
+
> /tmp/changelog-existing.raw.md || true
|
|
209
|
+
sed '/./,$!d' /tmp/changelog-existing.raw.md > /tmp/changelog-existing.md
|
|
186
210
|
|
|
187
211
|
{
|
|
188
|
-
|
|
189
|
-
printf '\n%s\n\n' "${MARKER}"
|
|
212
|
+
printf '%s\n\n' "${MARKER}"
|
|
190
213
|
cat /tmp/release-entry.md
|
|
191
|
-
if [ -s /tmp/changelog-
|
|
214
|
+
if [ -s /tmp/changelog-existing.md ]; then
|
|
192
215
|
printf '\n'
|
|
193
|
-
cat /tmp/changelog-
|
|
216
|
+
cat /tmp/changelog-existing.md
|
|
194
217
|
fi
|
|
195
218
|
} > /tmp/CHANGELOG.md
|
|
196
219
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,24 @@
|
|
|
1
|
+
## 0.7.1 (2026-03-01)
|
|
1
2
|
|
|
3
|
+
### Features
|
|
2
4
|
|
|
5
|
+
- 简短的介绍 ([
|
|
6
|
+
19236c5](https://github.com/imzbf/github-action-test/commit/
|
|
7
|
+
19236c5852bfb9e69fdbe5df23aa6123c228977c))
|
|
8
|
+
比较长的说明
|
|
9
|
+
BREAKING CHANGE: 不兼容的内容
|
|
10
|
+
re #2
|
|
3
11
|
|
|
12
|
+
### Others
|
|
4
13
|
|
|
14
|
+
- ci: cHANGELOG 现在会记录 commit 正文 ([
|
|
15
|
+
ab2bbab](https://github.com/imzbf/github-action-test/commit/
|
|
16
|
+
ab2bbabfe240ea3a377586f4701f63dba8e907d2))
|
|
17
|
+
re #3
|
|
5
18
|
|
|
19
|
+
**Full Changelog**: [v0.6.0...v0.7.1](https://github.com/imzbf/github-action-test/compare/v0.6.0...v0.7.1)
|
|
6
20
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<!-- next-release -->
|
|
21
|
+
---
|
|
11
22
|
|
|
12
23
|
## 0.6.0 (2026-03-01)
|
|
13
24
|
|