From aef0411dd1db56afe289c6e64497f871a3c677fc Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Fri, 16 Apr 2021 13:20:26 -0500 Subject: [PATCH 1/3] add deploy and asset update actions --- .../workflows/dotorg-asset-readme-update.yml | 16 ++++++++ .github/workflows/dotorg-push-deploy.yml | 38 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 .github/workflows/dotorg-asset-readme-update.yml create mode 100644 .github/workflows/dotorg-push-deploy.yml diff --git a/.github/workflows/dotorg-asset-readme-update.yml b/.github/workflows/dotorg-asset-readme-update.yml new file mode 100644 index 00000000..f5c04eff --- /dev/null +++ b/.github/workflows/dotorg-asset-readme-update.yml @@ -0,0 +1,16 @@ +name: Plugin asset/readme update +on: + push: + branches: + - trunk +jobs: + trunk: + name: Push to trunk + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: WordPress.org plugin asset/readme update + uses: 10up/action-wordpress-plugin-asset-update@stable + env: + SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} + SVN_USERNAME: ${{ secrets.SVN_USERNAME }} \ No newline at end of file diff --git a/.github/workflows/dotorg-push-deploy.yml b/.github/workflows/dotorg-push-deploy.yml new file mode 100644 index 00000000..43ce9988 --- /dev/null +++ b/.github/workflows/dotorg-push-deploy.yml @@ -0,0 +1,38 @@ +name: Deploy to WordPress.org +on: + release: + types: [published] +jobs: + tag: + name: New release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set Node.js 12 + uses: actions/setup-node@v1 + with: + node-version: '12.x' + - name: composer install + run: composer install --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 \ No newline at end of file From 42db28e692dcf32133696d3f59661d00d7eee146 Mon Sep 17 00:00:00 2001 From: Tung Du Date: Mon, 19 Apr 2021 15:10:24 +0700 Subject: [PATCH 2/3] add distignore --- .distignore | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .distignore diff --git a/.distignore b/.distignore new file mode 100644 index 00000000..64c808db --- /dev/null +++ b/.distignore @@ -0,0 +1,28 @@ +# Directories +/.git +/.github +/.wordpress-org +/node_modules +/tests +/assets +/config +# DO NOT EXCLUDE /vendor + +# Files +.distignore +.eslintignore +.eslintrc.json +.gitignore +CHANGELOG.md +CODE_OF_CONDUCT.md +composer.json +composer.lock +CONTRIBUTING.md +CREDITS.md +hookdoc-conf.json +LICENSE.md +package-lock.json +package.json +phpcs.xml +phpunit.xml +README.md From 5f8790e912bb9f458ea2bc0dab6757e2934447c2 Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Mon, 19 Apr 2021 08:51:04 -0500 Subject: [PATCH 3/3] Update .distignore --- .distignore | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.distignore b/.distignore index 64c808db..d5ee4a29 100644 --- a/.distignore +++ b/.distignore @@ -2,14 +2,15 @@ /.git /.github /.wordpress-org -/node_modules -/tests /assets /config +/node_modules +/tests # DO NOT EXCLUDE /vendor # Files .distignore +.editorconfig .eslintignore .eslintrc.json .gitignore