diff --git a/.github/workflows/build-release-zip.yml b/.github/workflows/build-release-zip.yml index 1b900975b..5e810082e 100644 --- a/.github/workflows/build-release-zip.yml +++ b/.github/workflows/build-release-zip.yml @@ -1,7 +1,6 @@ name: Build release zip on: - workflow_dispatch: release: types: [published] @@ -14,34 +13,16 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - - name: Set Node.js 16.x - uses: actions/setup-node@v3 - with: - node-version: 16.x - - - name: npm install and build + - name: Create ZIP run: | - npm install - npm run build - npm run makepot - composer install --no-dev - npm run archive - - - name: Upload the ZIP file as an artifact - if: ${{ github.event_name == 'workflow_dispatch' }} - uses: actions/upload-artifact@v3 - with: - name: ${{ github.event.repository.name }} - path: release - retention-days: 5 + git archive --prefix=classifai/ HEAD -o classifai.zip - name: Upload release asset - if: ${{ github.event_name == 'release' }} uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} - asset_path: ${{github.workspace}}/${{ github.event.repository.name }}.zip - asset_name: ${{ github.event.repository.name }}.zip + asset_path: ${{github.workspace}}/classifai.zip + asset_name: classifai.zip asset_content_type: application/zip