Create deploy-to-wordpress.org.yml
This commit is contained in:
parent
6b9e602d07
commit
469d48b84c
1 changed files with 42 additions and 0 deletions
42
.github/workflows/deploy-to-wordpress.org.yml
vendored
Normal file
42
.github/workflows/deploy-to-wordpress.org.yml
vendored
Normal file
|
@ -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
|
Reference in a new issue