Release (R2024b) #41
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
| # This workflow was automatically generated by `make_release_workflow.py`. | |
| # | |
| # Do not edit it directly! Instead edit the template `release-template.yml.jinja` | |
| # and re-generate the workflows using `make_release_workflow.py`. | |
| name: Release (R2024b) | |
| description: Compile, Build, Publish on PyPI, Release on GitHub | |
| on: | |
| workflow_run: | |
| workflows: [Release] | |
| types: | |
| - completed | |
| workflow_dispatch: | |
| inputs: | |
| spm-version: | |
| description: 'SPM Commit / Branch / Tag / SHA to checkout' | |
| required: false | |
| default: '' | |
| # ====================================================================== | |
| jobs: | |
| # -------------------------------------------------------------------- | |
| spm-version: | |
| outputs: | |
| value: ${{ join(steps.*.outputs.value, '') }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - id: if-run | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| run: | | |
| echo "$SPM_VERSION" | |
| echo "value=$SPM_VERSION" >> "$GITHUB_OUTPUT" | |
| env: | |
| SPM_VERSION: ${{ github.event.workflow_run.name }} | |
| - id: if-dispatch | |
| if: ${{ github.event_name == 'workflow_dispatch' }} | |
| run: | | |
| echo "$SPM_VERSION" | |
| echo "value=$SPM_VERSION" >> "$GITHUB_OUTPUT" | |
| env: | |
| SPM_VERSION: ${{ inputs.spm-version }} | |
| print-spm-version: | |
| needs: spm-version | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "spm-version: ${{ needs.spm-version.outputs.value }}" | |
| run: true | |
| # -------------------------------------------------------------------- | |
| guess-version: | |
| needs: spm-version | |
| uses: ./.github/workflows/guess_version.yml | |
| with: | |
| spm-version: ${{ needs.spm-version.outputs.value }} | |
| increase-post: false | |
| # -------------------------------------------------------------------- | |
| compile: | |
| needs: [guess-version, spm-version] | |
| uses: ./.github/workflows/compile.yml | |
| with: | |
| spm-version: ${{ needs.spm-version.outputs.value }} | |
| matlab-version: R2024b | |
| secrets: | |
| MATLAB_BATCH_TOKEN: ${{ secrets.MATLAB_BATCH_TOKEN }} | |
| # -------------------------------------------------------------------- | |
| build: | |
| needs: [compile, spm-version] | |
| uses: ./.github/workflows/build.yml | |
| with: | |
| spm-version: ${{ needs.spm-version.outputs.value }} | |
| matlab-version: R2024b | |
| main-package: false | |
| # -------------------------------------------------------------------- | |
| publish-test-pypi: | |
| needs: [build, spm-version] | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: testpypi | |
| url: https://test.pypi.org/p/spm-runtime-R2024b | |
| permissions: | |
| id-token: write # IMPORTANT: mandatory for trusted publishing | |
| steps: | |
| - name: Download distribution | |
| uses: actions/download-artifact@v4 | |
| env: | |
| SPM_VERSION: ${{ needs.spm-version.outputs.value }} | |
| MATLAB_VERSION: R2024b | |
| with: | |
| name: spm_${{ env.SPM_VERSION }}_${{ env.MATLAB_VERSION }}.dist | |
| path: dist/ | |
| - name: Publish distribution 📦 to Test PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ | |
| # -------------------------------------------------------------------- | |
| publish-pypi: | |
| needs: [publish-test-pypi, spm-version] | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/spm-runtime-R2024b | |
| permissions: | |
| id-token: write # IMPORTANT: mandatory for trusted publishing | |
| steps: | |
| - name: Download distribution | |
| uses: actions/download-artifact@v4 | |
| env: | |
| SPM_VERSION: ${{ needs.spm-version.outputs.value }} | |
| MATLAB_VERSION: R2024b | |
| with: | |
| name: spm_${{ env.SPM_VERSION }}_${{ env.MATLAB_VERSION }}.dist | |
| path: dist/ | |
| - name: Publish distribution 📦 to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |