Skip to content

chore: dont include hidden files/folders when building #10

chore: dont include hidden files/folders when building

chore: dont include hidden files/folders when building #10

Workflow file for this run

name: Plugin Build
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
- name: Set the version suffix for the output
run: echo VERSION_SUFFIX=${GITHUB_REF_NAME//\//-} >> $GITHUB_ENV
- name: Install dependencies and build
run: |
npm ci --legacy-peer-deps
npm run build --suffix=${{ env.VERSION_SUFFIX }}
- name: Rename build zip for PR
run: |
# Find the zip file in dist directory
ZIP_FILE=$(find dist -name "cimo-*.zip" -type f | head -1)
if [ -n "$ZIP_FILE" ]; then
mv "$ZIP_FILE" cimo-${{ env.VERSION_SUFFIX }}.zip
echo "Renamed $ZIP_FILE to cimo-${{ env.VERSION_SUFFIX }}.zip"
else
echo "Build zip file not found in dist directory"
echo "Contents of dist directory:"
ls -la dist/
exit 1
fi
- name: Upload PR build zip artifact
if: ${{ github.event_name == 'pull_request' }}
uses: gavv/[email protected]
with:
commit: ${{ github.event.pull_request.head.sha }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
artifacts: cimo-${{ env.VERSION_SUFFIX }}.zip
artifacts-branch: artifacts