From faffebdf96f3496cb01a7de1b7274aa11b4128ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehedi=20Hasan=20=20=E2=9A=A1=EF=B8=8F?= Date: Tue, 20 Feb 2024 10:57:01 +0600 Subject: [PATCH 1/8] update --- composer.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index cfa12fd8..83215da6 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,10 @@ "composer -d vendor --no-plugins --no-interaction install --no-scripts --no-dev" ], "format": "vendor/bin/phpcbf --standard=phpcs.xml", - "phpcs": "vendor/bin/phpcs --standard=phpcs.xml" + "phpcs": "vendor/bin/phpcs --standard=phpcs.xml", + "setup": [ + "composer install --no-cache" + ] }, "config": { "allow-plugins": { From 9015ec75f053f1ffe97d9dd07dbf4912325d2e82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehedi=20Hasan=20=20=E2=9A=A1=EF=B8=8F?= Date: Tue, 20 Feb 2024 11:18:47 +0600 Subject: [PATCH 2/8] update --- src/js/admin/pages/Signin.js | 2 +- src/js/components/Popup/AuthModal.js | 2 +- src/js/modules/Signin/index.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/admin/pages/Signin.js b/src/js/admin/pages/Signin.js index eb2a7a18..f08a817c 100644 --- a/src/js/admin/pages/Signin.js +++ b/src/js/admin/pages/Signin.js @@ -1,4 +1,4 @@ -import SignInModule from '@modules/SignIn'; +import SignInModule from '@modules/Signin'; export default function SignIn() { return ( diff --git a/src/js/components/Popup/AuthModal.js b/src/js/components/Popup/AuthModal.js index fe11be30..3b789ed4 100644 --- a/src/js/components/Popup/AuthModal.js +++ b/src/js/components/Popup/AuthModal.js @@ -1,6 +1,6 @@ import { useState } from '@wordpress/element'; import ReactSVG from 'react-inlinesvg'; -import SignInContent from '@modules/SignIn/SignInContent'; +import SignInContent from '@modules/Signin/SignInContent'; import SignUpContent from '@modules/SignUp/SignUpContent'; import { AuthModalStyle } from './style'; diff --git a/src/js/modules/Signin/index.js b/src/js/modules/Signin/index.js index 6504212b..b1ffb10c 100644 --- a/src/js/modules/Signin/index.js +++ b/src/js/modules/Signin/index.js @@ -1,5 +1,5 @@ import AuthLayout from '@layout/AuthLayout'; -import SignInContent from '@modules/SignIn/SignInContent'; // Fix import statement +import SignInContent from '@modules/Signin/SignInContent'; // Fix import statement export default function SignInModule() { return ( From c83fd5a9cdb6c26385d8b99b5d872d222d91e171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehedi=20Hasan=20=20=E2=9A=A1=EF=B8=8F?= Date: Tue, 20 Feb 2024 11:22:39 +0600 Subject: [PATCH 3/8] update --- src/js/modules/Signup/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/modules/Signup/index.js b/src/js/modules/Signup/index.js index 2a5a86a1..89ddbbcd 100644 --- a/src/js/modules/Signup/index.js +++ b/src/js/modules/Signup/index.js @@ -1,5 +1,5 @@ import AuthLayout from '@layout/AuthLayout'; -import SignUpContent from '@modules/SignUp/SignUpContent'; // Fix import statement +import SignUpContent from '@modules/Signup/SignUpContent'; // Fix import statement export default function SignUpModule() { return ( From 3e6428ecdb946c7243bfd0cb905a06f8dc444f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehedi=20Hasan=20=20=E2=9A=A1=EF=B8=8F?= Date: Tue, 20 Feb 2024 11:25:25 +0600 Subject: [PATCH 4/8] update --- src/js/admin/pages/Signin.js | 2 +- src/js/admin/pages/Signup.js | 2 +- src/js/components/Popup/AuthModal.js | 4 ++-- src/js/modules/{Signin => SignInx}/SignInContent.js | 0 src/js/modules/{Signin => SignInx}/index.js | 2 +- src/js/modules/{Signup => SignUpx}/SignUpContent.js | 0 src/js/modules/{Signup => SignUpx}/index.js | 2 +- 7 files changed, 6 insertions(+), 6 deletions(-) rename src/js/modules/{Signin => SignInx}/SignInContent.js (100%) rename src/js/modules/{Signin => SignInx}/index.js (73%) rename src/js/modules/{Signup => SignUpx}/SignUpContent.js (100%) rename src/js/modules/{Signup => SignUpx}/index.js (73%) diff --git a/src/js/admin/pages/Signin.js b/src/js/admin/pages/Signin.js index f08a817c..3891002c 100644 --- a/src/js/admin/pages/Signin.js +++ b/src/js/admin/pages/Signin.js @@ -1,4 +1,4 @@ -import SignInModule from '@modules/Signin'; +import SignInModule from '@modules/SignInx'; export default function SignIn() { return ( diff --git a/src/js/admin/pages/Signup.js b/src/js/admin/pages/Signup.js index cb851eaf..a9332ce5 100644 --- a/src/js/admin/pages/Signup.js +++ b/src/js/admin/pages/Signup.js @@ -1,4 +1,4 @@ -import SignUpModule from '@modules/SignUp'; +import SignUpModule from '@modules/SignUpx'; export default function SignUp() { return ( diff --git a/src/js/components/Popup/AuthModal.js b/src/js/components/Popup/AuthModal.js index 3b789ed4..563852d7 100644 --- a/src/js/components/Popup/AuthModal.js +++ b/src/js/components/Popup/AuthModal.js @@ -1,7 +1,7 @@ import { useState } from '@wordpress/element'; import ReactSVG from 'react-inlinesvg'; -import SignInContent from '@modules/Signin/SignInContent'; -import SignUpContent from '@modules/SignUp/SignUpContent'; +import SignInContent from '@modules/SignInx/SignInContent'; +import SignUpContent from '@modules/SignUpx/SignUpContent'; import { AuthModalStyle } from './style'; import closeIcon from '@icon/close.svg'; diff --git a/src/js/modules/Signin/SignInContent.js b/src/js/modules/SignInx/SignInContent.js similarity index 100% rename from src/js/modules/Signin/SignInContent.js rename to src/js/modules/SignInx/SignInContent.js diff --git a/src/js/modules/Signin/index.js b/src/js/modules/SignInx/index.js similarity index 73% rename from src/js/modules/Signin/index.js rename to src/js/modules/SignInx/index.js index b1ffb10c..6bdde7cd 100644 --- a/src/js/modules/Signin/index.js +++ b/src/js/modules/SignInx/index.js @@ -1,5 +1,5 @@ import AuthLayout from '@layout/AuthLayout'; -import SignInContent from '@modules/Signin/SignInContent'; // Fix import statement +import SignInContent from '@modules/SignInx/SignInContent'; // Fix import statement export default function SignInModule() { return ( diff --git a/src/js/modules/Signup/SignUpContent.js b/src/js/modules/SignUpx/SignUpContent.js similarity index 100% rename from src/js/modules/Signup/SignUpContent.js rename to src/js/modules/SignUpx/SignUpContent.js diff --git a/src/js/modules/Signup/index.js b/src/js/modules/SignUpx/index.js similarity index 73% rename from src/js/modules/Signup/index.js rename to src/js/modules/SignUpx/index.js index 89ddbbcd..5673c100 100644 --- a/src/js/modules/Signup/index.js +++ b/src/js/modules/SignUpx/index.js @@ -1,5 +1,5 @@ import AuthLayout from '@layout/AuthLayout'; -import SignUpContent from '@modules/Signup/SignUpContent'; // Fix import statement +import SignUpContent from '@modules/SignUpx/SignUpContent'; // Fix import statement export default function SignUpModule() { return ( From 4f91a1e24fb78eba46a2b3bedf89165ca139ba72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehedi=20Hasan=20=20=E2=9A=A1=EF=B8=8F?= Date: Tue, 20 Feb 2024 11:28:46 +0600 Subject: [PATCH 5/8] update --- .github/workflows/deploy-to-staging.yml | 9 +++------ src/js/admin/pages/Signin.js | 2 +- src/js/admin/pages/Signup.js | 2 +- src/js/components/Popup/AuthModal.js | 4 ++-- src/js/modules/{SignInx => SignIn}/SignInContent.js | 0 src/js/modules/{SignInx => SignIn}/index.js | 2 +- src/js/modules/{SignUpx => SignUp}/SignUpContent.js | 0 src/js/modules/{SignUpx => SignUp}/index.js | 2 +- 8 files changed, 9 insertions(+), 12 deletions(-) rename src/js/modules/{SignInx => SignIn}/SignInContent.js (100%) rename src/js/modules/{SignInx => SignIn}/index.js (73%) rename src/js/modules/{SignUpx => SignUp}/SignUpContent.js (100%) rename src/js/modules/{SignUpx => SignUp}/index.js (73%) diff --git a/.github/workflows/deploy-to-staging.yml b/.github/workflows/deploy-to-staging.yml index 34b80372..28f3e681 100644 --- a/.github/workflows/deploy-to-staging.yml +++ b/.github/workflows/deploy-to-staging.yml @@ -13,12 +13,12 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - - name: Set up PHP + - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: '7.4' - - name: Setup composer + - name: Setup Composer run: composer setup - name: Setup Node.js 18.15.0 @@ -38,13 +38,10 @@ jobs: - name: Fix Text Domain run: yarn fixtextdomain - - name: Generate Text Domain POT file - run: composer make-unminified-pot - - name: Remove Composer Dev Dependencies run: composer build - - name: 📂 Sync files + - name: 📂 Sync Files - FTP Deploy uses: SamKirkland/FTP-Deploy-Action@v4.3.4 with: server: ${{ secrets.ftp_staging_server }} diff --git a/src/js/admin/pages/Signin.js b/src/js/admin/pages/Signin.js index 3891002c..eb2a7a18 100644 --- a/src/js/admin/pages/Signin.js +++ b/src/js/admin/pages/Signin.js @@ -1,4 +1,4 @@ -import SignInModule from '@modules/SignInx'; +import SignInModule from '@modules/SignIn'; export default function SignIn() { return ( diff --git a/src/js/admin/pages/Signup.js b/src/js/admin/pages/Signup.js index a9332ce5..cb851eaf 100644 --- a/src/js/admin/pages/Signup.js +++ b/src/js/admin/pages/Signup.js @@ -1,4 +1,4 @@ -import SignUpModule from '@modules/SignUpx'; +import SignUpModule from '@modules/SignUp'; export default function SignUp() { return ( diff --git a/src/js/components/Popup/AuthModal.js b/src/js/components/Popup/AuthModal.js index 563852d7..fe11be30 100644 --- a/src/js/components/Popup/AuthModal.js +++ b/src/js/components/Popup/AuthModal.js @@ -1,7 +1,7 @@ import { useState } from '@wordpress/element'; import ReactSVG from 'react-inlinesvg'; -import SignInContent from '@modules/SignInx/SignInContent'; -import SignUpContent from '@modules/SignUpx/SignUpContent'; +import SignInContent from '@modules/SignIn/SignInContent'; +import SignUpContent from '@modules/SignUp/SignUpContent'; import { AuthModalStyle } from './style'; import closeIcon from '@icon/close.svg'; diff --git a/src/js/modules/SignInx/SignInContent.js b/src/js/modules/SignIn/SignInContent.js similarity index 100% rename from src/js/modules/SignInx/SignInContent.js rename to src/js/modules/SignIn/SignInContent.js diff --git a/src/js/modules/SignInx/index.js b/src/js/modules/SignIn/index.js similarity index 73% rename from src/js/modules/SignInx/index.js rename to src/js/modules/SignIn/index.js index 6bdde7cd..6504212b 100644 --- a/src/js/modules/SignInx/index.js +++ b/src/js/modules/SignIn/index.js @@ -1,5 +1,5 @@ import AuthLayout from '@layout/AuthLayout'; -import SignInContent from '@modules/SignInx/SignInContent'; // Fix import statement +import SignInContent from '@modules/SignIn/SignInContent'; // Fix import statement export default function SignInModule() { return ( diff --git a/src/js/modules/SignUpx/SignUpContent.js b/src/js/modules/SignUp/SignUpContent.js similarity index 100% rename from src/js/modules/SignUpx/SignUpContent.js rename to src/js/modules/SignUp/SignUpContent.js diff --git a/src/js/modules/SignUpx/index.js b/src/js/modules/SignUp/index.js similarity index 73% rename from src/js/modules/SignUpx/index.js rename to src/js/modules/SignUp/index.js index 5673c100..2a5a86a1 100644 --- a/src/js/modules/SignUpx/index.js +++ b/src/js/modules/SignUp/index.js @@ -1,5 +1,5 @@ import AuthLayout from '@layout/AuthLayout'; -import SignUpContent from '@modules/SignUpx/SignUpContent'; // Fix import statement +import SignUpContent from '@modules/SignUp/SignUpContent'; // Fix import statement export default function SignUpModule() { return ( From 25e753b591ffbd21368853cffe4204b18130fb3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehedi=20Hasan=20=20=E2=9A=A1=EF=B8=8F?= Date: Tue, 20 Feb 2024 11:39:49 +0600 Subject: [PATCH 6/8] update --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 83215da6..e200ccb4 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ }, "scripts": { "build": [ - "composer -d vendor --no-plugins --no-interaction install --no-scripts --no-dev" + "composer -d . --no-plugins --no-interaction install --no-scripts --no-dev" ], "format": "vendor/bin/phpcbf --standard=phpcs.xml", "phpcs": "vendor/bin/phpcs --standard=phpcs.xml", From bc6fa8b770545ba760a0b64e46465ca7a8db66d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehedi=20Hasan=20=20=E2=9A=A1=EF=B8=8F?= Date: Tue, 20 Feb 2024 11:45:53 +0600 Subject: [PATCH 7/8] eclude src --- .github/workflows/deploy-to-staging.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy-to-staging.yml b/.github/workflows/deploy-to-staging.yml index 28f3e681..3f3bfb61 100644 --- a/.github/workflows/deploy-to-staging.yml +++ b/.github/workflows/deploy-to-staging.yml @@ -49,6 +49,7 @@ jobs: password: ${{ secrets.ftp_staging_password }} port: 21 exclude: | + src/** node_modules/** resources/js/** resources/svg/** From f07fca4d96e0b4a8da15b664dc916a5bc80a7254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehedi=20Hasan=20=20=E2=9A=A1=EF=B8=8F?= Date: Tue, 20 Feb 2024 15:04:34 +0600 Subject: [PATCH 8/8] add release tag compress --- .../workflows/build-production-release.yml | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/build-production-release.yml diff --git a/.github/workflows/build-production-release.yml b/.github/workflows/build-production-release.yml new file mode 100644 index 00000000..ac6188df --- /dev/null +++ b/.github/workflows/build-production-release.yml @@ -0,0 +1,60 @@ +name: Build Production & Release + +on: + release: + types: + - created + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + + - name: Setup composer + run: composer setup + + - name: Setup Node.js 18.15.0 + uses: actions/setup-node@v2 + with: + node-version: "18.15.0" + + - name: Install yarn globally + run: npm install --global yarn + + - name: Install yarn dependencies + run: yarn install + + - name: Compile Scripts + run: yarn minify + + - name: Fix Text Domain + run: yarn fixtextdomain + + - name: Generate Text Domain POT file + run: composer make-production-pot + + - name: Remove Composer Dev Dependencies + run: composer build + + - name: Build plugin + run: yarn git-compress + + - name: Create zip file + run: | + tag_name=$(git describe --tags --abbrev=0) + zip -r "templatiq.${tag_name}.zip" templatiq + + - name: Upload zip file as a release asset + uses: softprops/action-gh-release@v1 + with: + files: templatiq*.zip + env: + GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }}