From 69d6e85750c33e4c33a5a41c084dc5530984a89b Mon Sep 17 00:00:00 2001 From: MaxwellGarceau Date: Fri, 27 Dec 2024 11:46:53 -0500 Subject: [PATCH 01/13] Replace github release action --- .github/workflows/wordpress-plugin-deploy.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/wordpress-plugin-deploy.yml b/.github/workflows/wordpress-plugin-deploy.yml index f2a9dff..a994a42 100644 --- a/.github/workflows/wordpress-plugin-deploy.yml +++ b/.github/workflows/wordpress-plugin-deploy.yml @@ -39,12 +39,11 @@ jobs: SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} SLUG: mailchimp - - name: Upload release asset - uses: actions/upload-release-asset@v1.0.2 + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + files: ${{ steps.deploy.outputs.zip-path }} + body: | + This release contains the latest updates for the WordPress plugin. env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ${{ steps.deploy.outputs.zip-path }} - asset_name: mailchimp.zip - asset_content_type: application/zip From 213f72f94e0c683ec5f7a0afa0836cb350cfc20b Mon Sep 17 00:00:00 2001 From: MaxwellGarceau Date: Fri, 27 Dec 2024 11:48:06 -0500 Subject: [PATCH 02/13] Comment out WP deploy and add workflow dispatch for testing --- .github/workflows/wordpress-plugin-deploy.yml | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/wordpress-plugin-deploy.yml b/.github/workflows/wordpress-plugin-deploy.yml index a994a42..1c6047c 100644 --- a/.github/workflows/wordpress-plugin-deploy.yml +++ b/.github/workflows/wordpress-plugin-deploy.yml @@ -3,6 +3,7 @@ name: Deploy to WordPress.org on: release: types: [published] + workflow_dispatch: # TODO: Delete after testing is complete jobs: tag: @@ -29,15 +30,17 @@ jobs: sudo apt-get update sudo apt-get install subversion - - 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 }} - SLUG: mailchimp + # TODO: Uncomment after testing is complete + + # - 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 }} + # SLUG: mailchimp - name: Create GitHub Release uses: softprops/action-gh-release@v2 From d74be4fd931f6ad6f0580b0cec5a3c81eb9f33d8 Mon Sep 17 00:00:00 2001 From: MaxwellGarceau Date: Fri, 27 Dec 2024 12:03:46 -0500 Subject: [PATCH 03/13] Add dummy credentials to avoid real deploy --- .github/workflows/wordpress-plugin-deploy.yml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/wordpress-plugin-deploy.yml b/.github/workflows/wordpress-plugin-deploy.yml index 1c6047c..b829c4d 100644 --- a/.github/workflows/wordpress-plugin-deploy.yml +++ b/.github/workflows/wordpress-plugin-deploy.yml @@ -30,17 +30,17 @@ jobs: sudo apt-get update sudo apt-get install subversion - # TODO: Uncomment after testing is complete + # TODO: Revert dummy changes after testing is successful - # - 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 }} - # SLUG: mailchimp + - name: WordPress Plugin Deploy (dummy credentials used) + id: deploy + uses: 10up/action-wordpress-plugin-deploy@stable + with: + generate-zip: true + env: + SVN_USERNAME: "dummy-user" + SVN_PASSWORD: "dummy-pass" + SLUG: dummy-slug - name: Create GitHub Release uses: softprops/action-gh-release@v2 From a242041e22763e8d62c0e4b8963537a992bc630b Mon Sep 17 00:00:00 2001 From: MaxwellGarceau Date: Fri, 27 Dec 2024 12:12:46 -0500 Subject: [PATCH 04/13] Add continue on error --- .github/workflows/wordpress-plugin-deploy.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/wordpress-plugin-deploy.yml b/.github/workflows/wordpress-plugin-deploy.yml index b829c4d..53271c8 100644 --- a/.github/workflows/wordpress-plugin-deploy.yml +++ b/.github/workflows/wordpress-plugin-deploy.yml @@ -32,15 +32,16 @@ jobs: # TODO: Revert dummy changes after testing is successful - - name: WordPress Plugin Deploy (dummy credentials used) + - name: WordPress Plugin Deploy (dummy credentials used) # TODO: Rename after testing id: deploy uses: 10up/action-wordpress-plugin-deploy@stable with: generate-zip: true env: - SVN_USERNAME: "dummy-user" - SVN_PASSWORD: "dummy-pass" - SLUG: dummy-slug + SVN_USERNAME: "dummy-user" # TODO: Revert after testing + SVN_PASSWORD: "dummy-pass" # TODO: Revert after testing + SLUG: dummy-slug # TODO: Revert after testing + continue-on-error: true # TODO: Remove after testing - name: Create GitHub Release uses: softprops/action-gh-release@v2 From 1f42bcc25f6d8846c2d628abc511dfcfe097505d Mon Sep 17 00:00:00 2001 From: MaxwellGarceau Date: Fri, 27 Dec 2024 12:46:33 -0500 Subject: [PATCH 05/13] Generate zip file outside of deploy to WP.org --- .github/workflows/wordpress-plugin-deploy.yml | 32 +++++++++++++------ 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/.github/workflows/wordpress-plugin-deploy.yml b/.github/workflows/wordpress-plugin-deploy.yml index 53271c8..478063a 100644 --- a/.github/workflows/wordpress-plugin-deploy.yml +++ b/.github/workflows/wordpress-plugin-deploy.yml @@ -32,21 +32,33 @@ jobs: # TODO: Revert dummy changes after testing is successful - - name: WordPress Plugin Deploy (dummy credentials used) # TODO: Rename after testing + # - name: WordPress Plugin Deploy (dummy credentials used) # TODO: Rename after testing + # id: deploy + # uses: 10up/action-wordpress-plugin-deploy@stable + # with: + # generate-zip: true + # env: + # SVN_USERNAME: "dummy-user" # TODO: Revert after testing + # SVN_PASSWORD: "dummy-pass" # TODO: Revert after testing + # SLUG: dummy-slug # TODO: Revert after testing + # continue-on-error: true # TODO: Remove after testing + + # TODO: Delete this after done testing + # Generate the WordPress Plugin zip file without deploying + - name: Generate Plugin Zip File (skip deploy to WordPress.org) id: deploy - uses: 10up/action-wordpress-plugin-deploy@stable - with: - generate-zip: true + run: | + # Create a zip file for the plugin + mkdir -p build + zip -r build/mailchimp.zip . -x "*.git*" "node_modules/*" "tests/*" env: - SVN_USERNAME: "dummy-user" # TODO: Revert after testing - SVN_PASSWORD: "dummy-pass" # TODO: Revert after testing - SLUG: dummy-slug # TODO: Revert after testing - continue-on-error: true # TODO: Remove after testing + SLUG: mailchimp - - name: Create GitHub Release + - name: Update GitHub release with built plugin files uses: softprops/action-gh-release@v2 with: - files: ${{ steps.deploy.outputs.zip-path }} + # files: ${{ steps.deploy.outputs.zip-path }} # TODO: Revert this after testing + files: build/mailchimp.zip # TODO: Remove this after testing body: | This release contains the latest updates for the WordPress plugin. env: From 7f05287ed1c818ffce11e20d77310599120ae686 Mon Sep 17 00:00:00 2001 From: MaxwellGarceau Date: Fri, 27 Dec 2024 13:20:23 -0500 Subject: [PATCH 06/13] Remove testing workarounds --- .github/workflows/wordpress-plugin-deploy.yml | 30 +++++-------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/.github/workflows/wordpress-plugin-deploy.yml b/.github/workflows/wordpress-plugin-deploy.yml index 478063a..1578438 100644 --- a/.github/workflows/wordpress-plugin-deploy.yml +++ b/.github/workflows/wordpress-plugin-deploy.yml @@ -3,7 +3,6 @@ name: Deploy to WordPress.org on: release: types: [published] - workflow_dispatch: # TODO: Delete after testing is complete jobs: tag: @@ -29,36 +28,21 @@ jobs: run: | sudo apt-get update sudo apt-get install subversion - - # TODO: Revert dummy changes after testing is successful - # - name: WordPress Plugin Deploy (dummy credentials used) # TODO: Rename after testing - # id: deploy - # uses: 10up/action-wordpress-plugin-deploy@stable - # with: - # generate-zip: true - # env: - # SVN_USERNAME: "dummy-user" # TODO: Revert after testing - # SVN_PASSWORD: "dummy-pass" # TODO: Revert after testing - # SLUG: dummy-slug # TODO: Revert after testing - # continue-on-error: true # TODO: Remove after testing - - # TODO: Delete this after done testing - # Generate the WordPress Plugin zip file without deploying - - name: Generate Plugin Zip File (skip deploy to WordPress.org) + - name: WordPress Plugin Deploy id: deploy - run: | - # Create a zip file for the plugin - mkdir -p build - zip -r build/mailchimp.zip . -x "*.git*" "node_modules/*" "tests/*" + uses: 10up/action-wordpress-plugin-deploy@stable + with: + generate-zip: true env: + SVN_USERNAME: ${{ secrets.SVN_USERNAME }} + SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} SLUG: mailchimp - name: Update GitHub release with built plugin files uses: softprops/action-gh-release@v2 with: - # files: ${{ steps.deploy.outputs.zip-path }} # TODO: Revert this after testing - files: build/mailchimp.zip # TODO: Remove this after testing + files: ${{ steps.deploy.outputs.zip-path }} body: | This release contains the latest updates for the WordPress plugin. env: From d2e39e5652b4ca5f36d2d4ea022f5042af286427 Mon Sep 17 00:00:00 2001 From: MaxwellGarceau Date: Fri, 27 Dec 2024 13:26:23 -0500 Subject: [PATCH 07/13] Rename last job step --- .github/workflows/wordpress-plugin-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wordpress-plugin-deploy.yml b/.github/workflows/wordpress-plugin-deploy.yml index 1578438..b043697 100644 --- a/.github/workflows/wordpress-plugin-deploy.yml +++ b/.github/workflows/wordpress-plugin-deploy.yml @@ -39,7 +39,7 @@ jobs: SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} SLUG: mailchimp - - name: Update GitHub release with built plugin files + - name: Attach the wordpress.org plugin files to the Github release uses: softprops/action-gh-release@v2 with: files: ${{ steps.deploy.outputs.zip-path }} From fd48a2b3ef608b7ffba66a904173c4945dfb083b Mon Sep 17 00:00:00 2001 From: MaxwellGarceau Date: Fri, 27 Dec 2024 13:37:22 -0500 Subject: [PATCH 08/13] Add test workflow file --- ...eploy-test-softprops-gh-release-action.yml | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/wordpress-plugin-deploy-test-softprops-gh-release-action.yml diff --git a/.github/workflows/wordpress-plugin-deploy-test-softprops-gh-release-action.yml b/.github/workflows/wordpress-plugin-deploy-test-softprops-gh-release-action.yml new file mode 100644 index 0000000..17817cd --- /dev/null +++ b/.github/workflows/wordpress-plugin-deploy-test-softprops-gh-release-action.yml @@ -0,0 +1,64 @@ +# TODO: THIS WORKFLOW FILE IS TO TEST ISSUE #60 "Resolve release deploy action warnings" +# DELETE AFTER TESTING IS COMPLETE. THIS WORKFLOW FILE IS UNNECESSARY. + +name: (delete after testing is done) - Test "Deploy to WordPress.org" + +on: + workflow_dispatch: # TODO: Delete after testing is complete + +jobs: + tag: + name: New release + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup node version and npm cache + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Build + run: | + npm ci --no-optional + npm run build + + - name: Install SVN + run: | + sudo apt-get update + sudo apt-get install subversion + + # TESTING: COMMENTED OUT TO AVOID DEPLOY TO WORDPRESS.ORG DURING TESTING + + # - 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 }} + # SLUG: mailchimp + + # TESTING: Generate the WordPress Plugin zip file without deploying + - name: Generate Plugin Zip File For Testing (skip deploy to WordPress.org) + id: deploy + run: | + # Create a zip file for the plugin + mkdir -p build + zip -r build/mailchimp.zip . -x "*.git*" "node_modules/*" "tests/*" + env: + SLUG: mailchimp + + - name: Update GitHub release with built plugin files + uses: softprops/action-gh-release@v2 + with: + # files: ${{ steps.deploy.outputs.zip-path }} # TESTING: Original zip file source + files: build/mailchimp.zip # TESTING: Get zip file from generate plugin step + body: | + This release contains the latest updates for the WordPress plugin. + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From afd3387830f5f5f321a12884530d0b5e88c27fbf Mon Sep 17 00:00:00 2001 From: MaxwellGarceau Date: Fri, 27 Dec 2024 13:43:27 -0500 Subject: [PATCH 09/13] Pass tag in test workflow file --- ...lugin-deploy-test-softprops-gh-release-action.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wordpress-plugin-deploy-test-softprops-gh-release-action.yml b/.github/workflows/wordpress-plugin-deploy-test-softprops-gh-release-action.yml index 17817cd..1b9428e 100644 --- a/.github/workflows/wordpress-plugin-deploy-test-softprops-gh-release-action.yml +++ b/.github/workflows/wordpress-plugin-deploy-test-softprops-gh-release-action.yml @@ -4,7 +4,16 @@ name: (delete after testing is done) - Test "Deploy to WordPress.org" on: - workflow_dispatch: # TODO: Delete after testing is complete +# TESTING: Commented out to avoid running on the published event by mistake +# release: +# types: [published] + +# TESTING: Draft a release and then run the workflow file manually + workflow_dispatch: + inputs: + tag: + description: 'The tag for the release (e.g., v1.0.0)' + required: true jobs: tag: @@ -58,6 +67,7 @@ jobs: with: # files: ${{ steps.deploy.outputs.zip-path }} # TESTING: Original zip file source files: build/mailchimp.zip # TESTING: Get zip file from generate plugin step + tag_name: ${{ github.event.inputs.tag }} # Pass the tag from workflow_dispatch input body: | This release contains the latest updates for the WordPress plugin. env: From f1e2bc6799ecff6bdca130b6787b903a9904ffb1 Mon Sep 17 00:00:00 2001 From: MaxwellGarceau Date: Fri, 27 Dec 2024 14:01:03 -0500 Subject: [PATCH 10/13] Remove whitespace and blank line --- .github/workflows/wordpress-plugin-deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wordpress-plugin-deploy.yml b/.github/workflows/wordpress-plugin-deploy.yml index b043697..30881c0 100644 --- a/.github/workflows/wordpress-plugin-deploy.yml +++ b/.github/workflows/wordpress-plugin-deploy.yml @@ -28,7 +28,7 @@ jobs: run: | sudo apt-get update sudo apt-get install subversion - + - name: WordPress Plugin Deploy id: deploy uses: 10up/action-wordpress-plugin-deploy@stable @@ -46,4 +46,4 @@ jobs: body: | This release contains the latest updates for the WordPress plugin. env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 81873de703d97c53bc6600850d79dfc51a9fb097 Mon Sep 17 00:00:00 2001 From: MaxwellGarceau Date: Fri, 27 Dec 2024 14:02:50 -0500 Subject: [PATCH 11/13] Add back blank line --- .github/workflows/wordpress-plugin-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wordpress-plugin-deploy.yml b/.github/workflows/wordpress-plugin-deploy.yml index 30881c0..e16c0b3 100644 --- a/.github/workflows/wordpress-plugin-deploy.yml +++ b/.github/workflows/wordpress-plugin-deploy.yml @@ -46,4 +46,4 @@ jobs: body: | This release contains the latest updates for the WordPress plugin. env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 64411117d7d79b854d2e8b62457c8c815a6f41d3 Mon Sep 17 00:00:00 2001 From: MaxwellGarceau Date: Thu, 2 Jan 2025 17:29:39 -0500 Subject: [PATCH 12/13] Skip pre release triggers. Remove test workflow file. --- ...eploy-test-softprops-gh-release-action.yml | 74 ------------------- .github/workflows/wordpress-plugin-deploy.yml | 1 + 2 files changed, 1 insertion(+), 74 deletions(-) delete mode 100644 .github/workflows/wordpress-plugin-deploy-test-softprops-gh-release-action.yml diff --git a/.github/workflows/wordpress-plugin-deploy-test-softprops-gh-release-action.yml b/.github/workflows/wordpress-plugin-deploy-test-softprops-gh-release-action.yml deleted file mode 100644 index 1b9428e..0000000 --- a/.github/workflows/wordpress-plugin-deploy-test-softprops-gh-release-action.yml +++ /dev/null @@ -1,74 +0,0 @@ -# TODO: THIS WORKFLOW FILE IS TO TEST ISSUE #60 "Resolve release deploy action warnings" -# DELETE AFTER TESTING IS COMPLETE. THIS WORKFLOW FILE IS UNNECESSARY. - -name: (delete after testing is done) - Test "Deploy to WordPress.org" - -on: -# TESTING: Commented out to avoid running on the published event by mistake -# release: -# types: [published] - -# TESTING: Draft a release and then run the workflow file manually - workflow_dispatch: - inputs: - tag: - description: 'The tag for the release (e.g., v1.0.0)' - required: true - -jobs: - tag: - name: New release - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup node version and npm cache - uses: actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Build - run: | - npm ci --no-optional - npm run build - - - name: Install SVN - run: | - sudo apt-get update - sudo apt-get install subversion - - # TESTING: COMMENTED OUT TO AVOID DEPLOY TO WORDPRESS.ORG DURING TESTING - - # - 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 }} - # SLUG: mailchimp - - # TESTING: Generate the WordPress Plugin zip file without deploying - - name: Generate Plugin Zip File For Testing (skip deploy to WordPress.org) - id: deploy - run: | - # Create a zip file for the plugin - mkdir -p build - zip -r build/mailchimp.zip . -x "*.git*" "node_modules/*" "tests/*" - env: - SLUG: mailchimp - - - name: Update GitHub release with built plugin files - uses: softprops/action-gh-release@v2 - with: - # files: ${{ steps.deploy.outputs.zip-path }} # TESTING: Original zip file source - files: build/mailchimp.zip # TESTING: Get zip file from generate plugin step - tag_name: ${{ github.event.inputs.tag }} # Pass the tag from workflow_dispatch input - body: | - This release contains the latest updates for the WordPress plugin. - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/wordpress-plugin-deploy.yml b/.github/workflows/wordpress-plugin-deploy.yml index e16c0b3..bc71c73 100644 --- a/.github/workflows/wordpress-plugin-deploy.yml +++ b/.github/workflows/wordpress-plugin-deploy.yml @@ -8,6 +8,7 @@ jobs: tag: name: New release runs-on: ubuntu-latest + if: ${{ !github.event.release.prerelease }} # Skip job if it is a pre-release steps: - name: Checkout code From 1474fbe477f96072274f85c3f14addf0966ea878 Mon Sep 17 00:00:00 2001 From: MaxwellGarceau Date: Thu, 2 Jan 2025 17:33:44 -0500 Subject: [PATCH 13/13] Add back test workflow file for QA --- ...eploy-test-softprops-gh-release-action.yml | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 .github/workflows/wordpress-plugin-deploy-test-softprops-gh-release-action.yml diff --git a/.github/workflows/wordpress-plugin-deploy-test-softprops-gh-release-action.yml b/.github/workflows/wordpress-plugin-deploy-test-softprops-gh-release-action.yml new file mode 100644 index 0000000..1b9428e --- /dev/null +++ b/.github/workflows/wordpress-plugin-deploy-test-softprops-gh-release-action.yml @@ -0,0 +1,74 @@ +# TODO: THIS WORKFLOW FILE IS TO TEST ISSUE #60 "Resolve release deploy action warnings" +# DELETE AFTER TESTING IS COMPLETE. THIS WORKFLOW FILE IS UNNECESSARY. + +name: (delete after testing is done) - Test "Deploy to WordPress.org" + +on: +# TESTING: Commented out to avoid running on the published event by mistake +# release: +# types: [published] + +# TESTING: Draft a release and then run the workflow file manually + workflow_dispatch: + inputs: + tag: + description: 'The tag for the release (e.g., v1.0.0)' + required: true + +jobs: + tag: + name: New release + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup node version and npm cache + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Build + run: | + npm ci --no-optional + npm run build + + - name: Install SVN + run: | + sudo apt-get update + sudo apt-get install subversion + + # TESTING: COMMENTED OUT TO AVOID DEPLOY TO WORDPRESS.ORG DURING TESTING + + # - 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 }} + # SLUG: mailchimp + + # TESTING: Generate the WordPress Plugin zip file without deploying + - name: Generate Plugin Zip File For Testing (skip deploy to WordPress.org) + id: deploy + run: | + # Create a zip file for the plugin + mkdir -p build + zip -r build/mailchimp.zip . -x "*.git*" "node_modules/*" "tests/*" + env: + SLUG: mailchimp + + - name: Update GitHub release with built plugin files + uses: softprops/action-gh-release@v2 + with: + # files: ${{ steps.deploy.outputs.zip-path }} # TESTING: Original zip file source + files: build/mailchimp.zip # TESTING: Get zip file from generate plugin step + tag_name: ${{ github.event.inputs.tag }} # Pass the tag from workflow_dispatch input + body: | + This release contains the latest updates for the WordPress plugin. + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}