From 7be8ce0f81dd627b44895aea2529b1ae349eab87 Mon Sep 17 00:00:00 2001 From: Joan Rodas Date: Sun, 2 Jul 2023 20:12:55 +0200 Subject: [PATCH] Deploy to WP.org --- .distignore | 19 +++++++++++++++++++ .github/workflows/assets.yml | 19 +++++++++++++++++++ .github/workflows/deploy.yml | 26 ++++++++++++++++++++++++++ Components/.wordpress-org/.gitkeep | 0 4 files changed, 64 insertions(+) create mode 100644 .distignore create mode 100644 .github/workflows/assets.yml create mode 100644 .github/workflows/deploy.yml create mode 100644 Components/.wordpress-org/.gitkeep diff --git a/.distignore b/.distignore new file mode 100644 index 0000000..c5bdd77 --- /dev/null +++ b/.distignore @@ -0,0 +1,19 @@ +/.git +/.github +/node_modules +/.wordpress-org + +.editorconfig +.distignore +.eslintrc.js +.gitattributes +.gitignore +.stylelintrc.js +postcss.config.js +tailwind.config.js +tsconfig.json +webpack.config.js +package.json +yarn.lock +readme.md +composer.lock \ No newline at end of file diff --git a/.github/workflows/assets.yml b/.github/workflows/assets.yml new file mode 100644 index 0000000..13d2b0e --- /dev/null +++ b/.github/workflows/assets.yml @@ -0,0 +1,19 @@ +name: Plugin assets or readme update + +on: + push: + branches: + - main +jobs: + main: + name: Push to trunk + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: WordPress.org plugin assets/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/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..627e4d7 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,26 @@ +name: Deploy to WordPress.org + +on: + push: + tags: + - "*" +jobs: + tag: + name: On new tag + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set Node.js 16.x + uses: actions/setup-node@v3 + with: + node-version: 16.x + - run: composer install && yarn && yarn build + + - name: WordPress Plugin Deploy + uses: 10up/action-wordpress-plugin-deploy@master + env: + SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} + SVN_USERNAME: ${{ secrets.SVN_USERNAME }} + SLUG: plugin-placeholder \ No newline at end of file diff --git a/Components/.wordpress-org/.gitkeep b/Components/.wordpress-org/.gitkeep new file mode 100644 index 0000000..e69de29