Skip to content

Commit

Permalink
Combine the release steps to ensure that releases are tagged (WordPre…
Browse files Browse the repository at this point in the history
…ss#65591)

Currently the release process is timing out. This is due to the 5 minute timeout included in the trunk commit command.

The current steps appear to be attempting to set the `Stable Tag` to the current stable (not the current release) but is setting it to the upcoming release anyway.

The process can be simplified by combining the Stable Tag / Trunk Commit / SVN copy into a single commit.

This will avoid situations where the trunk commit passes but the tag is not created.

Raising the timeout to 10 minutes (which is the default in SVN) should hopefully resolve the underlying timeout.

Co-authored-by: dd32 <[email protected]>
Co-authored-by: andrewserong <[email protected]>
Co-authored-by: mikachan <[email protected]>
Co-authored-by: ockham <[email protected]>
Co-authored-by: talldan <[email protected]>
  • Loading branch information
6 people authored and yogeshbhutkar committed Dec 18, 2024
1 parent d8b7ec4 commit af15dec
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions .github/workflows/upload-release-to-plugin-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ jobs:

steps:
- name: Check out Gutenberg trunk from WP.org plugin repo
run: svn checkout "$PLUGIN_REPO_URL/trunk" --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
run: |
svn checkout "$PLUGIN_REPO_URL/trunk" --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
svn checkout "$PLUGIN_REPO_URL/tags" --depth=immediates --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
- name: Delete everything
working-directory: ./trunk
Expand All @@ -182,7 +184,7 @@ jobs:
unzip gutenberg.zip -d trunk
rm gutenberg.zip
- name: Replace the stable tag placeholder with the existing stable tag on the SVN repository
- name: Replace the stable tag placeholder with the new version
env:
STABLE_TAG_PLACEHOLDER: 'Stable tag: V\.V\.V'
run: |
Expand All @@ -194,27 +196,16 @@ jobs:
name: changelog trunk
path: trunk

- name: Commit the content changes
- name: Commit the release
working-directory: ./trunk
run: |
svn st | grep '^?' | awk '{print $2}' | xargs -r svn add
svn st | grep '^!' | awk '{print $2}' | xargs -r svn rm
svn commit -m "Committing version $VERSION" \
svn cp . "../tags/$VERSION"
svn commit . "../tags/$VERSION" \
-m "Releasing version $VERSION" \
--no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD" \
--config-option=servers:global:http-timeout=300
- name: Create the SVN tag
working-directory: ./trunk
run: |
svn copy "$PLUGIN_REPO_URL/trunk" "$PLUGIN_REPO_URL/tags/$VERSION" -m "Tagging version $VERSION" \
--no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
- name: Update the plugin's stable version
working-directory: ./trunk
run: |
sed -i "s/Stable tag: ${STABLE_VERSION_REGEX}/Stable tag: ${VERSION}/g" ./readme.txt
svn commit -m "Releasing version $VERSION" \
--no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
--config-option=servers:global:http-timeout=600
upload-tag:
name: Publish as tag
Expand Down

0 comments on commit af15dec

Please sign in to comment.