Ship CLI as package #1
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
| # .github/workflows/publish-packages.yml | |
| name: Publish stubs | |
| on: | |
| push: | |
| tags: ["v*.*.*"] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: publish-stubs-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| firmware: | |
| if: github.ref_type == 'tag' | |
| uses: ./.github/workflows/build-firmware.yml | |
| permissions: | |
| contents: write | |
| publish: | |
| needs: firmware | |
| if: always() && needs.firmware.result != 'failure' && needs.firmware.result != 'cancelled' | |
| runs-on: ubuntu-latest | |
| environment: pypi | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: PlohnenSoftware/PyPI-Anaconda-Publish@v2 | |
| with: | |
| prepare: uv run alpaca generate-stubs student | |
| project_dir: .alpaca/stubs | |
| tag: ${{ github.ref_type == 'tag' && github.ref_name || '' }} | |
| anaconda_owner: NB_TUDelft | |
| anaconda_api_key: ${{ secrets.ANACONDA_API_KEY }} | |
| dry_run: ${{ github.event_name == 'pull_request' }} | |
| - uses: PlohnenSoftware/PyPI-Anaconda-Publish@v2 | |
| with: | |
| prepare: uv build | |
| project_dir: . | |
| tag: ${{ github.ref_type == 'tag' && github.ref_name || '' }} | |
| anaconda_owner: NB_TUDelft | |
| anaconda_api_key: ${{ secrets.ANACONDA_API_KEY }} | |
| dry_run: ${{ github.event_name == 'pull_request' }} |