removed token added permissions! #9
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
| env: | |
| DOCMAKER_GITHUB_TOKEN: ${{ secrets.DOCMAKER_GITHUB_TOKEN }} | |
| name: Build and Test Toolbox | |
| on: [push] | |
| permissions: | |
| contents: write | |
| jobs: | |
| package-dynare-utils: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| name: Package Toolbox | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Extract version from tag | |
| shell: bash | |
| run: | | |
| VERSION="${GITHUB_REF#refs/tags/v}" | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| - name: Extract release notes | |
| shell: bash | |
| id: extract_notes | |
| run: | | |
| TAG_NAME="${GITHUB_REF#refs/tags/v}" | |
| awk "/^## Version $TAG_NAME\$/ {flag=1; next} /^## Version / {flag=0} flag" tbx/docmakerdoc/changelog.md > RELEASE_NOTES.md | |
| sed -i ':a;/^\n*$/{$d;N;ba}' RELEASE_NOTES.md | |
| echo "notes<<EOF" >> $GITHUB_OUTPUT | |
| cat RELEASE_NOTES.md >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| - name: Set up MATLAB | |
| uses: matlab-actions/setup-matlab@v2 | |
| with: | |
| products: MATLAB | |
| release: R2025b | |
| - name: Package toolbox | |
| uses: matlab-actions/run-build@v2 | |
| with: | |
| build-options: -skip test | |
| - name: Release Toolbox | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: Dynare Utils ${{ env.VERSION }} | |
| tag_name: v${{ env.VERSION }} | |
| body: ${{ steps.extract_notes.outputs.notes }} | |
| draft: false | |
| make_latest: true | |
| files: releases/DynareUtils.mltbx |