diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 7c1c5f2b..96cbed3e 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -56,13 +56,14 @@ jobs: run: | echo "SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_ENV + # Keep in sync with the release used to test local builds - name: Set up MATLAB - uses: matlab-actions/setup-matlab@v2 + uses: matlab-actions/setup-matlab@v3 with: - release: R2024a + release: R2025b - name: Build Toolbox - uses: matlab-actions/run-command@v2 + uses: matlab-actions/run-command@v3 with: command: addpath('scripts'); build_release @@ -101,7 +102,7 @@ jobs: if-no-files-found: error - name: Create Release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' with: files: | diff --git a/scripts/build_release.m b/scripts/build_release.m index fd3e5bb9..c31e6535 100644 --- a/scripts/build_release.m +++ b/scripts/build_release.m @@ -73,6 +73,11 @@ toolbox_matlab_path = strsplit(genpath(mhkit_path), pathsep); toolbox_matlab_path = toolbox_matlab_path(~cellfun(@isempty, toolbox_matlab_path)); toolbox_matlab_path = toolbox_matlab_path(~cellfun(is_excluded, toolbox_matlab_path)); +% Only folders that directly contain packaged files, older releases (R2024a) +% reject path folders that only contain subfolders, such as mhkit itself +packaged_folders = unique(cellfun(@fileparts, toolbox_files, 'UniformOutput', false)); +toolbox_matlab_path = toolbox_matlab_path(ismember(toolbox_matlab_path, packaged_folders)); +fprintf('Adding %d folders to the MATLAB path\n', numel(toolbox_matlab_path)); fprintf('\nStarting MATLAB toolbox build of %s version %s\n', project_name, project_version);