Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions .github/workflows/build_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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(['<?xml version="1.0" encoding="UTF-8"?>' ...
'<deployment-project plugin="plugin.toolbox" v3.0>' ...
'<configuration file="pyraview.prj" name="pyraview" target="target.toolbox" target-name="Package Toolbox">' ...
'<param.guid>%s</param.guid>' ...
'</configuration></deployment-project>'], 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')
Expand Down