Skip to content

Commit a32af49

Browse files
update changelog and version number
1 parent b74ca96 commit a32af49

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/deploy.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Deploy to WordPress.org
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
tag:
7+
name: New release
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v2
12+
- name: Set up SVN
13+
run: sudo apt-get install -y subversion
14+
- name: Deploy to WordPress.org
15+
env:
16+
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
17+
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
18+
SLUG: your-plugin-slug
19+
run: |
20+
echo "Preparing to deploy to WordPress.org..."
21+
svn co "https://plugins.svn.wordpress.org/${SLUG}/" --username "${SVN_USERNAME}" --password "${SVN_PASSWORD}" svn
22+
23+
echo "Clearing the trunk folder..."
24+
rm -rf svn/trunk/*
25+
cp -R ./* svn/trunk/
26+
27+
echo "Adding new files to SVN..."
28+
cd svn/trunk/
29+
svn add --force * --auto-props --parents --depth infinity -q
30+
31+
echo "Setting SVN props..."
32+
svn propset svn:ignore -F .svnignore .
33+
34+
echo "Removing deleted files from SVN..."
35+
svn status | grep '^!' | awk '{print $2}' | xargs -I% svn rm %
36+
37+
echo "Committing to WordPress.org..."
38+
svn commit -m "Deploying version ${GITHUB_REF:10}" --username "${SVN_USERNAME}" --password "${SVN_PASSWORD}" --no-auth-cache
39+
40+
echo "Deployment completed!"

0 commit comments

Comments
 (0)