Release #7
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
| # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
| name: "Release" | |
| on: | |
| push: | |
| tags: | |
| - "*" | |
| workflow_dispatch: | |
| # Declare default permissions as read only. | |
| permissions: read-all | |
| jobs: | |
| build: | |
| name: Build and Publish | |
| runs-on: ubuntu-latest | |
| environment: | |
| # Create this environment in the GitHub repository under Settings -> Environments | |
| name: release | |
| permissions: | |
| actions: read | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Set up Python | |
| uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
| with: | |
| python-version: "3.12" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| uv sync --frozen --all-packages | |
| - name: Build packages | |
| run: | | |
| uv build --all-packages | |
| - name: Publish to PyPI | |
| run: | | |
| uv publish --trusted-publishing always |