tljh-matlab v0.0.5 #3
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
# Copyright 2024 The MathWorks, Inc. | |
name: Upload Python Package for tljh-matlab | |
on: | |
release: | |
types: [published] | |
permissions: | |
contents: read | |
jobs: | |
build-tljh-matlab: | |
# Only run job if release tag contains `tljh-matlab` | |
if: ${{ contains(github.ref, 'tljh-matlab') }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
cd ./install_guides/the-littlest-jupyterhub/tljh-matlab | |
pip install build | |
- name: Build package | |
run: | | |
cd ./install_guides/the-littlest-jupyterhub/tljh-matlab | |
python -m build | |
- name: Upload distributions | |
uses: actions/upload-artifact@v4 | |
with: | |
name: release-dists | |
path: dist/ | |
release-tljh-matlab: | |
runs-on: ubuntu-latest | |
needs: | |
- build-tljh-matlab | |
permissions: | |
# IMPORTANT: this permission is mandatory for trusted publishing | |
id-token: write | |
environment: | |
name: pypi | |
url: https://pypi.org/project/tljh-matlab | |
steps: | |
- name: Retrieve release distributions | |
uses: actions/download-artifact@v4 | |
with: | |
name: release-dists | |
path: dist/ | |
- name: Publish to PyPI. | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: install_guides/the-littlest-jupyterhub/tljh-matlab |