diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index 6c54d00..fa8542d 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -130,14 +130,23 @@ jobs: RELEASE_TAG: ${{ github.ref_name }} with: command: | - % Create the options object without a PRJ file - opts = matlab.addons.toolbox.ToolboxOptions(pwd); + % 1. Create a dummy .prj content with a GUID so the constructor doesn't crash + guid = char(java.util.UUID.randomUUID()); + prjContent = sprintf(['' ... + '' ... + '' ... + '%s' ... + ''], guid); + + % 2. Write it to a temporary file + fid = fopen('temp_packaging.prj', 'w'); + fprintf(fid, '%s', prjContent); + fclose(fid); + + % Create the options object from the temporary PRJ + opts = matlab.addons.toolbox.ToolboxOptions('temp_packaging.prj'); opts.ToolboxName = 'Pyraview'; - % 2. CRITICAL: Generate and assign a unique identifier - % This satisfies the 'Unique toolbox identifier must be specified' error - opts.ToolboxIdentifier = char(java.util.UUID.randomUUID()); - % Grab version from environment variable v = getenv('RELEASE_TAG'); if startsWith(v, 'v')