Bug corrected in CorAnaAPP #72
Workflow file for this run
This file contains 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
# Publish GitHub release assets (FSDA.mltbx file to be compatible with | |
# MathWorks FileExchange new 'link your [repo] to GitHub' feature.) | |
name: Publish FSDA.mltbx to GitHub release assets | |
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- '*' # Push events to matching *, i.e. v1.0 or 18.6.1 | |
# release: | |
# types: | |
# - published | |
env: | |
# Define a specific version of MATLAB to release the toolbox | |
MATLAB_RELEASE: R2023a | |
# We also need a specific version to build the older v3 doc search | |
MATLAB_RELEASE_DOC_V3: R2021b | |
jobs: | |
# # This job will specifically build the doc search db in 21b which is needed for pre-22a versions of MATLAB | |
# build-docsearch-v3: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout on your repository | |
# uses: actions/checkout@v3 | |
# # Sets up MATLAB on the GitHub Actions runner using the older version of MATLAB | |
# - name: Setup MATLAB | |
# uses: matlab-actions/setup-matlab@v2-beta | |
# with: | |
# release: ${{ env.MATLAB_RELEASE_DOC_V3 }} | |
# # Runs a set of commands using the runners shell - note that 21b doesn't support | |
# # 'buildtool' so we use the specific script in a MATLAB run action | |
# - name: Build docseach db with MATLAB | |
# uses: matlab-actions/run-command@v1 | |
# with: | |
# command: "cd('toolbox/utilities_help/build'); buildDocSearchForToolboxPre22a()" | |
# # Finally keep a copy of the artifacts generated for the next job to download | |
# - name: Upload helpsearch-v3 | |
# if: ${{ always() }} | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# # Artifact key to be used with download-artifact | |
# name: helpsearch-v3-files | |
# # A file, directory or wildcard pattern that describes what to upload | |
# path: helpfiles/pointersHTML/helpsearch-v3/ | |
# This job does the build of the MLTBX file in the MATLAB_RELEASE version of MATLAB | |
archive-build-artifacts: | |
# Do not run this job until the previous job is complete | |
# needs: build-docsearch-v3 | |
runs-on: ubuntu-latest | |
outputs: | |
# This output is used by the next job to correctly tag the docker image being built | |
fsda-release: ${{ steps.extract_tag.outputs.tag }} | |
steps: | |
- name: Checkout on your repository | |
uses: actions/checkout@v3 | |
# - name: Download helpsearch-v3 | |
# if: ${{ always() }} | |
# uses: actions/download-artifact@v3 | |
# with: | |
# name: helpsearch-v3-files | |
# path: helpfiles/pointersHTML/helpsearch-v3/ | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false | |
# We are going to start a display server using XVFB to ensure that if the toolbox build | |
# triggers something that needs a display we have one. This is a done prophylacticly in | |
# case something one day needs a display. | |
- name: Start display server | |
run: | | |
sudo apt-get install xvfb | |
Xvfb :99 & | |
echo "DISPLAY=:99" >> $GITHUB_ENV | |
- name: Extract tag from this release | |
id: extract_tag | |
shell: bash | |
run: | | |
echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
echo "GITHUB_RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
# Since this version of MATLAB is likely the same as used in ci.yml if there is a cached version | |
# use that instead of doing the install. | |
- name: Cache MATLAB | |
id: cache-matlab | |
uses: actions/cache@v3 | |
with: | |
path: ${{ runner.tool_cache }}/MATLAB | |
key: ${{ env.MATLAB_RELEASE }}-ubuntu-latest | |
# Sets up MATLAB on the GitHub Actions runner | |
- name: Setup MATLAB | |
uses: matlab-actions/setup-matlab@v2-beta | |
with: | |
release: ${{ env.MATLAB_RELEASE }} | |
# Runs buildtool in the root of the repository, triggering the `toolbox` task | |
- name: Run MLTBX build | |
uses: matlab-actions/run-build@v1 | |
with: | |
tasks: toolbox | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./toolbox/bin/FSDA.mltbx | |
asset_name: FSDA.mltbx | |
asset_content_type: application/gzip | |
build-docker-container: | |
needs: archive-build-artifacts | |
uses: ./.github/workflows/reusable-build-docker-container.yml | |
with: | |
matlab-release: latest | |
fsda-release: ${{ needs.archive-build-artifacts.outputs.fsda-release }} | |
secrets: inherit |