Skip to content

Deploying new versions

Ashley Gibson edited this page Mar 6, 2025 · 11 revisions

The following outlines the process for deploying new versions of this framework.

Prepping the release branch

This step should ideally be done before any PRs have been merged. Instead of merging changes into master, we create a release branch and merge changes into that.

To create a release branch:

  1. Navigate to the Prepare Release GitHub action.
  2. Click "Run workflow" on the right and enter the desired new version number and base branch. The branch you select is the base that will be used for the newly-created release PR.
  3. Wait for the action to run. The action will perform the following for you:
    • Bump all versioned namespaces to the new plugin version number, i.e. v5_5_4
    • Update the composer autoload namespaces in composer.json
    • Bump the SV_WC_Plugin::VERSION constant to the new version
    • Bump the composer.json version number.
    • Bump the package.json version number.
    • Bump the SV_WC_Framework_Plugin_Loader::FRAMEWORK_VERSION constant.
    • Add a new version heading in the /woocommerce/changelog.txt file.
    • Run npm build to compile assets and generate an updated POT file
  4. Once the action is completed, a new draft PR should be created for the release.
  5. Tests may not run automatically against the new PR. To trigger them, either: close and then immediately open the PR, or push up an empty commit.
    • Confirm that the automated tests pass ✅
  6. Test the release with one of our plugins to ensure no unexpected errors.

Creating the release

Once all changes have been merged into the release branch, a new version can be finalized and deployed.

  1. Merge the release branch into master
  2. Create a new release
    • Name the tag the plain version number (no v or other prefix)
    • Name the release with the v prefix
    • Paste in the changelog entries as the description
  3. Update the Upgrade-guide

Common issues

Issues while running npx run build

  1. Could not find an option named "sourcemap"
    • Install Sass - npm install -g sass
  2. parcel: not found
  3. .../wc-plugin-framework/woocommerce/payment-gateway/assets/js/frontend/sv-wc-payment-gateway-google-pay.js: Invalid Version: undefined
    • Open the .js file
    • Add the following snippet to the top of the file
      /**
       * Version 5.10.5
       */
    • Run the npx run build again
    • Rollback the changes to the .js file