-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb59fc3
commit 8458689
Showing
1 changed file
with
16 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,25 @@ | ||
name: Deploy to SVN on Tag | ||
|
||
name: Deploy to WordPress.org | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
- "*" | ||
jobs: | ||
deploy: | ||
tag: | ||
name: New tag | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Setup SVN credentials | ||
run: | | ||
echo "::add-mask::$SVN_USERNAME" | ||
echo "::add-mask::$SVN_PASSWORD" | ||
- name: Checkout SVN repository | ||
run: | | ||
svn checkout --depth=immediates https://plugins.svn.wordpress.org/custom-fonts svn-custom-fonts | ||
cd svn-custom-fonts | ||
svn update trunk tags | ||
- uses: actions/checkout@master | ||
|
||
- name: Copy files to SVN trunk | ||
run: | | ||
rsync -av --delete --exclude=".git" --exclude=".github" --exclude=".gitignore" --exclude="node_modules" \ | ||
--exclude="tests" --exclude="README.md" --exclude="package-lock.json" --exclude="package.json" ./ ./svn-custom-fonts/trunk/ | ||
- name: Use Node.js 14.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14.x | ||
|
||
- name: Add new tag in SVN | ||
env: | ||
VERSION: ${{ github.ref_name }} | ||
run: | | ||
cd svn-custom-fonts | ||
svn copy trunk tags/$VERSION | ||
svn update tags/$VERSION | ||
- name: Build Assets | ||
run: npm install && npm run build-package | ||
|
||
- name: Commit changes to SVN | ||
run: | | ||
cd svn-custom-fonts | ||
svn add --force . | ||
svn commit --username ${{ secrets.SVN_USERNAME }} --password ${{ secrets.SVN_PASSWORD }} -m "Deploying version ${{ github.ref_name }}" | ||
- name: WordPress Plugin Deploy | ||
uses: Nikschavan/action-wordpress-plugin-deploy@develop | ||
env: | ||
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | ||
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} |