From c27d99a923785f32e9d5c4560363144f83da39d6 Mon Sep 17 00:00:00 2001 From: Ravinder Kumar Date: Tue, 7 Mar 2023 12:15:36 +0530 Subject: [PATCH] chore: fix generate zip Github worflow related issues --- .github/workflows/build-stable.yml | 7 +++++-- .github/workflows/generate-zip.yml | 19 +++++++++++-------- webpack.config.release.js | 4 ---- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-stable.yml b/.github/workflows/build-stable.yml index 04f357fcb..71ab22050 100644 --- a/.github/workflows/build-stable.yml +++ b/.github/workflows/build-stable.yml @@ -20,13 +20,16 @@ jobs: php-version: 7.4 tools: composer:v2 - name: Check versions - run: npm -v; node -v, php -v, composer -v + run: | + npm -v + node -v + php -v + composer -v - name: Install and build run: | composer install --no-dev npm install - npm run makepot npm run release - name: Push to Stable env: diff --git a/.github/workflows/generate-zip.yml b/.github/workflows/generate-zip.yml index 7928ac0a9..b065c8767 100644 --- a/.github/workflows/generate-zip.yml +++ b/.github/workflows/generate-zip.yml @@ -5,7 +5,7 @@ on: inputs: ref: description: 'Git Commit Ref (branch, tag, or hash)' - required: true + required: false type: string jobs: @@ -25,21 +25,24 @@ jobs: uses: shivammathur/setup-php@2.17.0 with: php-version: 7.4 - tools: composer:v2 + tools: composer:v2, wp - name: Check versions - run: npm -v; node -v, php -v, composer -v + run: | + npm -v + node -v + php -v + composer -v - name: Install and build run: | composer install --no-dev npm install - npm run makepot - npm run plugin-zip + npm run release + rm -rf ./release && unzip ${{ github.event.repository.name }}.zip -d ./release - name: Upload the ZIP file as an artifact - if: ${{ github.event_name == 'workflow_dispatch' }} uses: actions/upload-artifact@v3 with: - name: ${{ inputs.plugin_slug }} - path: ${{ inputs.plugin_slug }} + name: ${{ github.event.repository.name }} + path: release retention-days: 5 diff --git a/webpack.config.release.js b/webpack.config.release.js index 522217029..98edf3b98 100644 --- a/webpack.config.release.js +++ b/webpack.config.release.js @@ -21,10 +21,6 @@ module.exports = { { from: 'includes/**/*', to: './' }, { from: 'lang/**/*', to: './' }, { from: 'templates/**/*', to: './' }, - { - from: 'vendor/georgestephanis/application-passwords/**/*', - to: './', - }, { from: 'vendor/yahnis-elsts/plugin-update-checker/**/*', to: './',