From e3490d500b76174cd421207e8d362fb1bca429b0 Mon Sep 17 00:00:00 2001 From: Timo Hubois Date: Tue, 9 Jul 2024 00:15:00 +0200 Subject: [PATCH] feat(workflows): add workflow for plugin asset/readme update and deployment --- .../workflows/{main.yml => commit-checks.yml} | 0 .../workflows/deploay-asset-readme-update.yml | 17 +++++++++++ ...oy-to-wordpress-org-and-create-release.yml | 29 +++++++++++++++++++ 3 files changed, 46 insertions(+) rename .github/workflows/{main.yml => commit-checks.yml} (100%) create mode 100644 .github/workflows/deploay-asset-readme-update.yml create mode 100644 .github/workflows/deploy-to-wordpress-org-and-create-release.yml diff --git a/.github/workflows/main.yml b/.github/workflows/commit-checks.yml similarity index 100% rename from .github/workflows/main.yml rename to .github/workflows/commit-checks.yml diff --git a/.github/workflows/deploay-asset-readme-update.yml b/.github/workflows/deploay-asset-readme-update.yml new file mode 100644 index 0000000..8a5dc8f --- /dev/null +++ b/.github/workflows/deploay-asset-readme-update.yml @@ -0,0 +1,17 @@ +name: Plugin asset/readme update +on: + push: + branches: + - main +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 }} + SLUG: components-overview-flynt diff --git a/.github/workflows/deploy-to-wordpress-org-and-create-release.yml b/.github/workflows/deploy-to-wordpress-org-and-create-release.yml new file mode 100644 index 0000000..ae1573c --- /dev/null +++ b/.github/workflows/deploy-to-wordpress-org-and-create-release.yml @@ -0,0 +1,29 @@ +name: Deploy and Release Plugin +on: + push: + tags: + - "*" +jobs: + tag: + name: New tag + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - 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: components-overview-flynt + - name: Create GitHub release + uses: softprops/action-gh-release@v1 + with: + files: ${{github.workspace}}/${{ github.event.repository.name }}.zip + name: v${{github.ref_name}} + generate_release_notes: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}