diff --git a/.github/workflows/build_pyspinw.yml b/.github/workflows/build_pyspinw.yml index 305c64edb..077a9529b 100644 --- a/.github/workflows/build_pyspinw.yml +++ b/.github/workflows/build_pyspinw.yml @@ -70,11 +70,11 @@ jobs: - name: Set up MATLAB uses: matlab-actions/setup-matlab@v2 with: - release: ${{ matrix.matlab_version }} + release: latest - name: Build mltbx uses: matlab-actions/run-command@v2 with: - command: "create_mltbx" + command: "cd mltbx; create_mltbx" - name: Upload mltbx uses: actions/upload-artifact@v4 with: diff --git a/mltbx/create_mltbx.m b/mltbx/create_mltbx.m index 6967c0ad0..b0632e664 100644 --- a/mltbx/create_mltbx.m +++ b/mltbx/create_mltbx.m @@ -1,5 +1,8 @@ currdir = fileparts(mfilename('fullpath')); -rmdir(fullfile(currdir, 'mltbx'), 's'); +mltbx_dir = fullfile(currdir, 'mltbx'); +if exist(mltbx_dir) + rmdir(mltbx_dir, 's'); +end mkdir(fullfile(currdir, 'mltbx')); copyfile(fullfile(currdir, '..', 'CITATION.cff'), fullfile(currdir, 'mltbx')); copyfile(fullfile(currdir, '..', 'license.txt'), fullfile(currdir, 'mltbx'));