ci(check): add zip package to feature branch artifacts

Create zip file with format: git-files-push-{version}-{branch}.zip
for feature branch builds.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
tianyao 2026-04-24 04:41:52 +00:00
parent 0107749d71
commit bc84e98e19

View file

@ -91,11 +91,24 @@ jobs:
fi
echo "✓ All build artifacts present"
- name: Get version from manifest
id: version
run: echo "version=$(node -p "require('./manifest.json').version")" >> $GITHUB_OUTPUT
- name: Create plugin package
run: |
BRANCH_NAME=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
BRANCH_NAME_SAFE=$(echo "$BRANCH_NAME" | sed 's/[^a-zA-Z0-9._-]/-/g')
ZIP_NAME="git-files-push-${{ steps.version.outputs.version }}-${BRANCH_NAME_SAFE}.zip"
zip -j "$ZIP_NAME" main.js manifest.json styles.css
echo "ZIP_NAME=$ZIP_NAME" >> $GITHUB_ENV
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: plugin-build
name: plugin-build-${{ steps.version.outputs.version }}-${{ github.sha }}
path: |
${{ env.ZIP_NAME }}
main.js
manifest.json
styles.css