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