Skip to content

Commit be7a4ab

Browse files
authored
Merge pull request #129 from WebDevStudios/feature/auto-deploy
Action for Auto-deploy
2 parents f5653c7 + 8e75465 commit be7a4ab

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

.distignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.distignore
2+
.gitignore
3+
/.git
4+
/.github
5+
/node_modules
6+
/tests
7+
/webpack
8+
cypress.example.json
9+
phpcs.xml.dist
10+
phpunit.xml
11+
README.md

.github/workflows/deploy.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy to WordPress.org
2+
on:
3+
release:
4+
types: [published]
5+
6+
workflow_dispatch:
7+
8+
jobs:
9+
tag:
10+
name: New release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
- name: Install dependencies
16+
uses: php-actions/composer@v5
17+
with:
18+
php_version: 7
19+
version: 1
20+
command: install
21+
args: --no-dev
22+
- name: Build
23+
run: |
24+
npm install
25+
npm run build
26+
- name: WordPress Plugin Deploy
27+
id: deploy
28+
uses: 10up/action-wordpress-plugin-deploy@stable
29+
with:
30+
generate-zip: true
31+
env:
32+
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
33+
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
34+
- name: Upload release asset
35+
uses: actions/upload-release-asset@v1
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
with:
39+
upload_url: ${{ github.event.release.upload_url }}
40+
asset_path: ${{github.workspace}}/${{ github.event.repository.name }}.zip
41+
asset_name: ${{ github.event.repository.name }}.zip
42+
asset_content_type: application/zip

0 commit comments

Comments
 (0)