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
| name: Publish Python Package using OIDC | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.10' | |
| - name: Install build dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build setuptools-scm | |
| - name: Build and publish bsm-api-client | |
| run: | | |
| cd packages/bsm-api-client | |
| python -m build | |
| env: | |
| SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.ref_name }} | |
| - name: Publish bsm-api-client to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: packages/bsm-api-client/dist/ | |
| - name: Build and publish bsm-cli | |
| run: | | |
| cd packages/bsm-cli | |
| python -m build | |
| env: | |
| SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.ref_name }} | |
| - name: Publish bsm-cli to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: packages/bsm-cli/dist/ |