Skip to content

Commit 6c29e40

Browse files
committed
Add WordPress.org deploy workflow
When a GitHub release is published, download the plugin zip from the release and deploy it to WordPress.org via SVN.
1 parent c6a59b6 commit 6c29e40

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Deploy to WordPress.org
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
deploy:
9+
name: Deploy plugin to WordPress.org
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Download plugin zip from release
14+
env:
15+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16+
RELEASE_TAG: ${{ github.event.release.tag_name }}
17+
run: |
18+
gh release download "$RELEASE_TAG" \
19+
--repo "${{ github.repository }}" \
20+
--pattern "sqlite-database-integration.zip" \
21+
--dir .
22+
unzip sqlite-database-integration.zip
23+
24+
- name: Deploy to WordPress.org
25+
uses: 10up/action-wordpress-plugin-deploy@v2
26+
env:
27+
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
28+
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
29+
SLUG: sqlite-database-integration
30+
BUILD_DIR: sqlite-database-integration

0 commit comments

Comments
 (0)