Merge pull request #226 from ImperialCollegeLondon/fix/datetime-slider #47
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: MATLAB Packaging | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| jobs: | |
| package: | |
| name: Package MATLAB Toolbox | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v5 | |
| - name: Set up MATLAB | |
| uses: matlab-actions/setup-matlab@v2.6.0 | |
| with: | |
| release: R2025b | |
| - name: Load version from package | |
| run: | | |
| echo "MAG_DATA_VISUALIZATION_VERSION=$(jq -r .version resources/mpackage.json)" >> $GITHUB_ENV | |
| - name: Validate version with tag | |
| run: | | |
| if [ "v${{ env.MAG_DATA_VISUALIZATION_VERSION }}" != "${{ github.ref_name }}" ]; then | |
| echo "Version mismatch between tag and environment variable" | |
| exit 1 | |
| fi | |
| - name: Package toolbox | |
| uses: matlab-actions/run-build@v2.5.2 | |
| with: | |
| tasks: package("${{ env.MAG_DATA_VISUALIZATION_VERSION }}") | |
| - name: Upload toolbox | |
| uses: actions/upload-artifact@v5.0.0 | |
| with: | |
| name: 'MAG Data Visualization.mltbx' | |
| path: artifacts | |
| if-no-files-found: error | |
| - name: Create release | |
| uses: ncipollo/release-action@v1.20.0 | |
| with: | |
| tag: v${{ env.MAG_DATA_VISUALIZATION_VERSION }} | |
| artifacts: 'artifacts/MAG Data Visualization.mltbx' | |
| bodyFile: 'resources/release-notes.md' |