From 469d48b84cdd7dd3f577c0ca5e14517da5491139 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Wed, 10 Mar 2021 14:56:51 +0000 Subject: [PATCH] Create deploy-to-wordpress.org.yml --- .github/workflows/deploy-to-wordpress.org.yml | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/deploy-to-wordpress.org.yml diff --git a/.github/workflows/deploy-to-wordpress.org.yml b/.github/workflows/deploy-to-wordpress.org.yml new file mode 100644 index 0000000..697806b --- /dev/null +++ b/.github/workflows/deploy-to-wordpress.org.yml @@ -0,0 +1,42 @@ +# This is a basic workflow to help you get started with Actions +name: Deploy to WordPress.org +on: + release: + types: [published] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + tag: + name: New release + # The type of runner that the job will run on + runs-on: ubuntu-latest + + + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Build + run: | + npm install + npm run build + + - name: WordPress Plugin Deploy + id: deploy + uses: 10up/action-wordpress-plugin-deploy@stable + with: + # Generate package zip file? + generate-zip: true + env: + SVN_USERNAME: ${{ secrets.SVN_USERNAME }} + SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} + + - name: Upload release asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ${{github.workspace}}/${{ github.event.repository.name }}.zip + asset_name: ${{ github.event.repository.name }}.zip + asset_content_type: application/zip