From a9b54920ae73fe460681c85596eb1be10fe89aa9 Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Mon, 20 Mar 2023 13:34:19 -0500 Subject: [PATCH 1/3] Update deploy.yml --- .github/workflows/deploy.yml | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 495203af..6ca0c798 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,10 +1,7 @@ name: Deploy -# Run deploy only on tag and master builds. +# Run deploy only on publised releases. on: - push: - branches: - - master release: types: [published] @@ -32,15 +29,21 @@ jobs: - name: Install NPM dependencies run: npm install - - name: Authenticate with WordPress.org SVN - run: svn info --non-interactive --username "${{ secrets.SVN_USERNAME }}" --password "${{ secrets.SVN_PASSWORD }}" https://plugins.svn.wordpress.org/two-factor/ + - 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: Deploy to WordPress.org SVN + - name: Upload release asset + uses: actions/upload-release-asset@v1 env: - DEPLOY_SVN_USERNAME: ${{ secrets.SVN_USERNAME }} - DEPLOY_TRUNK: ${{ contains( github.ref_name, 'master' ) }} - DEPLOY_TAG: ${{ contains( github.ref_type, 'tag' ) }} - DEPLOY_SKIP_CONFIRMATION: true - # Disable deployments while they are failing for unknown reason. - if: env.DEPLOY_SVN_USERNAME && false - run: npm run deploy + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ${{ steps.deploy.outputs.zip-path }} + asset_name: ${{ github.event.repository.name }}.zip + asset_content_type: application/zip From 75dffb6f82d313e17553db204ec04b1f727baa70 Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Wed, 22 Mar 2023 15:21:43 -0500 Subject: [PATCH 2/3] Update .github/workflows/deploy.yml Co-authored-by: Dion Hulse --- .github/workflows/deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6ca0c798..4c68a8ab 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -29,6 +29,8 @@ jobs: - name: Install NPM dependencies run: npm install + - name: Build plugin + run: npm run build - name: WordPress Plugin Deploy id: deploy uses: 10up/action-wordpress-plugin-deploy@stable From 3801b5dd2dddc5856a85128e67b4de72bdd57c75 Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Wed, 22 Mar 2023 15:21:49 -0500 Subject: [PATCH 3/3] Update .github/workflows/deploy.yml Co-authored-by: Dion Hulse --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4c68a8ab..fbd33a94 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -37,6 +37,7 @@ jobs: with: generate-zip: true env: + BUILD_DIR: dist SVN_USERNAME: ${{ secrets.SVN_USERNAME }} SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}