update github release

This commit is contained in:
duanfuxiang 2025-01-06 21:28:43 +08:00
parent 53d9bea32a
commit 349feac519

View File

@ -31,20 +31,24 @@ jobs:
run: |
npm run test
- name: Get Tag Name
id: get_tag
run: |
echo "tag_name=$(git tag --sort version:refname | tail -n 1)" >> $GITHUB_OUTPUT
- name: Bundle
id: bundle
run: |
mkdir ${{ env.PLUGIN_NAME }}
cp main.js manifest.json styles.css ${{ env.PLUGIN_NAME }}
zip -r ${{ env.PLUGIN_NAME }}-${{ steps.build.outputs.tag_name }}.zip ${{ env.PLUGIN_NAME }}
zip -r ${{ env.PLUGIN_NAME }}-${{ steps.get_tag.outputs.tag_name }}.zip ${{ env.PLUGIN_NAME }}
ls
echo "tag_name=$(git tag --sort version:refname | tail -n 1)" >> $GITHUB_OUTPUT
- name: Get release notes
id: release_notes
run: |
chmod +x .github/scripts/get-changelog.js
CHANGELOG=$(node .github/scripts/get-changelog.js ${{ steps.bundle.outputs.tag_name }})
CHANGELOG=$(node .github/scripts/get-changelog.js ${{ steps.get_tag.outputs.tag_name }})
if [ -z "$CHANGELOG" ]; then
echo "Error: No release notes found for this version in CHANGELOG.md"
exit 1
@ -59,7 +63,7 @@ jobs:
with:
token: ${{ github.token }}
files: |
${{ env.PLUGIN_NAME }}-${{ steps.bundle.outputs.tag_name }}.zip
${{ env.PLUGIN_NAME }}-${{ steps.get_tag.outputs.tag_name }}.zip
main.js
manifest.json
styles.css