Skip to content

Commit 9a1e56d

Browse files
committed
Update create_release.yml
1 parent 348e17f commit 9a1e56d

1 file changed

Lines changed: 13 additions & 25 deletions

File tree

.github/workflows/create_release.yml

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -44,33 +44,21 @@ jobs:
4444
- name: Create new release
4545
if: env.create_release == 'true'
4646
run: |
47+
--generate-notes \
4748
CURRENT_DATE=$(TZ='Asia/Shanghai' date +'%Y-%m-%d %H:%M')
48-
sed -i "s/\\$PACKAGE_VERSION/$PACKAGE_VERSION/g" CHANGELOG.md
49-
sed -i "s/\\$CURRENT_DATE/$CURRENT_DATE/g" CHANGELOG.md
50-
51-
GENERATED_NOTES_BODY=$(gh api \
52-
--method POST \
53-
/repos/${{ github.repository }}/releases/generate-notes \
54-
-f tag_name="$PACKAGE_VERSION" \
55-
| jq -r .body)
49+
sed -i "s/\$PACKAGE_VERSION/$PACKAGE_VERSION/g" CHANGELOG.md
50+
sed -i "s/\$CURRENT_DATE/$CURRENT_DATE/g" CHANGELOG.md
51+
gh release create "$PACKAGE_VERSION" \
52+
-t "$PACKAGE_VERSION" \
53+
-n "$(cat CHANGELOG.md)
5654
57-
{
58-
echo "$GENERATED_NOTES_BODY"
59-
echo
60-
cat CHANGELOG.md
61-
echo
62-
echo "---"
63-
echo
64-
echo "使用方法: "
65-
echo "- **Chrome / Edge / Arc / Brave:** [Chrome Web Store](https://chromewebstore.google.com/detail/fbgblmjbeebanackldpbmpacppflgmlj)"
66-
echo "- **国内用户:** [Crx 商店](https://www.crxsoso.com/webstore/detail/fbgblmjbeebanackldpbmpacppflgmlj)"
67-
echo "- **Firefox:** [Firefox Addons](https://addons.mozilla.org/zh-CN/firefox/addon/linux_do-scripts/)"
68-
echo
69-
echo "发布于:$CURRENT_DATE"
70-
} > release_body.md
55+
---
7156
72-
gh release create "$PACKAGE_VERSION" \
73-
-F release_body.md \
74-
-t "$PACKAGE_VERSION"
57+
使用方法:
58+
- **Chrome / Edge / Arc / Brave:** [Chrome Web Store](https://chromewebstore.google.com/detail/fbgblmjbeebanackldpbmpacppflgmlj)
59+
- **国内用户:** [Crx 商店](https://www.crxsoso.com/webstore/detail/fbgblmjbeebanackldpbmpacppflgmlj)
60+
- **Firefox:** [Firefox Addons](https://addons.mozilla.org/zh-CN/firefox/addon/linux_do-scripts/)
61+
62+
发布于:$CURRENT_DATE"
7563
env:
7664
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}

0 commit comments

Comments
 (0)