Skip to content

Merge pull request #133 from brainstormforce/workflow-changes #34

Merge pull request #133 from brainstormforce/workflow-changes

Merge pull request #133 from brainstormforce/workflow-changes #34

Workflow file for this run

name: Deploy to SVN on Tag
on:
push:
tags:
- '*'
jobs:
deploy:
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
- 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: 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: 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 }}"