add source zip to release #11
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
on: | |
push: | |
tags: | |
- "[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
release: | |
name: create release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set up MATLAB | |
uses: matlab-actions/setup-matlab@v2 | |
- name: package toolbox | |
uses: matlab-actions/run-command@v2 | |
with: | |
command: package("${{ github.ref_name }}", "ihn-psych.mltbx") | |
- name: create GitHub release | |
run: | | |
echo "function v = version, v = '${{ github.ref_name }}'; end" >toolbox/+ihn/version.m | |
(cd toolbox/ && zip -r ../"$ZIPFILE" +ihn/) | |
gh release create "${{ github.ref_name }}" *.mltbx "$ZIPFILE" | |
env: | |
ZIPFILE: ihn-psych-${{ github.ref_name }}.zip | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |