v0.2.0 #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
| name: Publish | |
| on: | |
| workflow_dispatch: # Allows manual trigger | |
| release: | |
| types: | |
| - published | |
| jobs: | |
| release: | |
| name: "Release" | |
| runs-on: '${{ matrix.os }}' | |
| strategy: | |
| matrix: | |
| # TODO: Comment in additional platforms if using C extensions / platform-specific wheels | |
| os: | |
| - ubuntu-latest | |
| # - macos-latest | |
| python-version: | |
| # - "3.10" | |
| # - "3.11" | |
| # - "3.12" | |
| - "3.13" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # make sure tags are fetched so we can get a version | |
| - name: Fetch Tags | |
| run: | | |
| git fetch --prune --unshallow --tags | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Azure Login | |
| uses: azure/login@v2 | |
| with: | |
| # https://github.com/azure/login/tree/v2/?tab=readme-ov-file#creds | |
| creds: | | |
| { | |
| "clientId": "${{ secrets.PL_INTERNAL_TOOLS_AZ_CLIENT_ID }}", | |
| "clientSecret": "${{ secrets.PL_INTERNAL_TOOLS_AZ_CLIENT_SECRET }}", | |
| "subscriptionId": "${{ vars.PL_INTERNAL_TOOLS_AZ_CLIENT_SUB_ID }}", | |
| "tenantId": "${{ secrets.PL_INTERNAL_TOOLS_AZ_TENANT_ID }}" | |
| } | |
| - name: Get Azure token | |
| run: echo "AZ_TOKEN=$(az account get-access-token --query accessToken -o tsv)" >> $GITHUB_ENV | |
| - name: Restore UV environment | |
| run: cp production.uv.lock uv.lock | |
| - name: Build Package | |
| run: | | |
| uv build --index https://$AZ_TOKEN@${{vars.PL_INTERNAL_PYPI_PULL_URL_NO_PROTOCOL}} | |
| - name: Upload | |
| run: | | |
| uv publish dist/* \ | |
| -u token_user \ | |
| -p $AZ_TOKEN \ | |
| --publish-url ${{vars.PL_INTERNAL_PYPI_PUSH_URL}} |