From 528d45b68c3b303cf2bb852a6723dc81a943d306 Mon Sep 17 00:00:00 2001 From: Ashar Irfan Date: Fri, 30 Jul 2021 23:51:12 +0500 Subject: [PATCH 1/4] Add GitHub deploy action workflow --- .github/workflows/deploy.yml | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..d7dc4b9f --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,42 @@ +name: Deploy to WordPress.org +on: + release: + types: [published] + + workflow_dispatch: + +jobs: + tag: + name: New release + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Install dependencies + uses: php-actions/composer@v5 + with: + php_version: 7 + version: 1 + command: install + args: --no-dev + - name: Build + run: | + npm install + npm run build + - name: WordPress Plugin Deploy + id: deploy + uses: 10up/action-wordpress-plugin-deploy@stable + with: + generate-zip: true + env: + SVN_USERNAME: ${{ secrets.SVN_USERNAME }} + SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} + - name: Upload release asset + 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_content_type: application/zip From a92b6a869770caca59d9a7dff3d2bf4b06ab1cc6 Mon Sep 17 00:00:00 2001 From: Ashar Irfan Date: Fri, 30 Jul 2021 23:51:20 +0500 Subject: [PATCH 2/4] Add .distignore --- .distignore | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .distignore diff --git a/.distignore b/.distignore new file mode 100644 index 00000000..e3a25ce5 --- /dev/null +++ b/.distignore @@ -0,0 +1,14 @@ +/.github +/.git +/.wordpress-org +/.vscode +/node_modules +.distignore +.gitignore +.nvmrc +composer.json +composer.lock +package-lock.json +package.json +phpcs.xml +readme.md From 241cf55027d2b7f746659f3d676e2c1e263d8dcd Mon Sep 17 00:00:00 2001 From: Ashar Irfan Date: Thu, 26 May 2022 02:04:07 +0500 Subject: [PATCH 3/4] Add vendor and .gitattributes to distignore --- .distignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.distignore b/.distignore index e3a25ce5..b0deac7b 100644 --- a/.distignore +++ b/.distignore @@ -3,7 +3,9 @@ /.wordpress-org /.vscode /node_modules +/vendor .distignore +.gitattributes .gitignore .nvmrc composer.json From 3108609b5374dd3a2aa49aae39bf9358400e5ea5 Mon Sep 17 00:00:00 2001 From: Ashar Irfan Date: Fri, 27 May 2022 01:31:13 +0500 Subject: [PATCH 4/4] Remove build steps because not required --- .github/workflows/deploy.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d7dc4b9f..6d47668d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,17 +12,6 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v2 - - name: Install dependencies - uses: php-actions/composer@v5 - with: - php_version: 7 - version: 1 - command: install - args: --no-dev - - name: Build - run: | - npm install - npm run build - name: WordPress Plugin Deploy id: deploy uses: 10up/action-wordpress-plugin-deploy@stable