prep build 12/21 #1
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
name: Sync Gutenberg plugin assets to WordPress.org plugin repo | |
on: | |
push: | |
branches: | |
- trunk | |
paths: | |
- assets/** | |
jobs: | |
sync-assets: | |
name: Sync assets to WordPress.org plugin repo | |
runs-on: ubuntu-latest | |
environment: wp.org plugin | |
env: | |
PLUGIN_REPO_URL: 'https://plugins.svn.wordpress.org/gutenberg' | |
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | |
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | |
steps: | |
- name: Check out Gutenberg assets folder from WP.org plugin repo | |
run: | | |
svn checkout "$PLUGIN_REPO_URL/assets" \ | |
--username "$SVN_USERNAME" --password "$SVN_PASSWORD" | |
- name: Delete everything | |
run: find assets -type f -not -path 'assets/.svn/*' -delete | |
- name: Checkout assets from current release | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
sparse-checkout: | | |
assets | |
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} | |
path: git | |
- name: Copy files from git checkout to svn working copy | |
run: cp -R git/assets/* assets | |
- name: Commit the updated assets | |
working-directory: ./assets | |
run: | | |
svn st | awk '/^?/ {print $2}' | xargs -r svn add | |
svn st | awk '/^!/ {print $2}' | xargs -r svn rm | |
svn commit . \ | |
-m "Sync assets for commit $GITHUB_SHA" \ | |
--no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD" \ | |
--config-option=servers:global:http-timeout=600 |