chore(deps): update pre-commit hook @biomejs/biome to v2 #841
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: Build & Release | |
| on: | |
| workflow_call: | |
| inputs: | |
| release-tag: | |
| required: true | |
| type: string | |
| description: Tag to release | |
| # TODO(CG-10758): create if it does not exist | |
| # workflow_dispatch: | |
| # inputs: | |
| # tag: | |
| # required: true | |
| # type: string | |
| # description: Tag to release | |
| push: | |
| tags: | |
| - v* | |
| pull_request: | |
| branches: | |
| - develop | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Build 3.${{ matrix.python }} ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ | |
| ubuntu-latest, | |
| ubuntu-22.04-arm, # https://github.com/actions/partner-runner-images/issues/37 https://github.com/orgs/community/discussions/148648#discussioncomment-12099554 | |
| macos-latest, | |
| macos-13, | |
| ] | |
| python: [12, 13] | |
| steps: | |
| - name: Github context | |
| env: | |
| GITHUB_CONTEXT: ${{ toJson(github) }} | |
| run: echo "$GITHUB_CONTEXT" | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ inputs.release-tag || github.event.pull_request.head.ref || github.ref }} | |
| repository: ${{ github.event.pull_request.head.repo.full_name || github.event.repository.full_name }} | |
| - name: Install UV | |
| uses: astral-sh/setup-uv@v5.4 | |
| id: setup-uv | |
| with: | |
| enable-cache: false | |
| prune-cache: false | |
| python-version: 3.${{ matrix.python }} | |
| version: "0.9.1" | |
| cache-suffix: 3.${{ matrix.python }} | |
| - name: Fetch tags | |
| if: ${{ inputs.release-tag || startsWith(github.ref, 'refs/tags/') }} | |
| run: | | |
| git branch | |
| git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
| # TODO: add cbuildwheel cache | |
| - name: Build wheel | |
| uses: pypa/cibuildwheel@v2.23.3 | |
| env: | |
| CIBW_BUILD: "*cp3${{ matrix.python }}*" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-${{ matrix.os }}-3.${{ matrix.python }} | |
| path: ./wheelhouse/*.whl | |
| release: | |
| if: ${{ inputs.release-tag || startsWith(github.ref, 'refs/tags/') }} | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: release | |
| permissions: | |
| id-token: write | |
| contents: write # grants permission to create a release on github | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup backend | |
| uses: ./.github/actions/setup-environment | |
| - name: Download All Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| pattern: wheels-* | |
| - name: Release PyPI | |
| uses: ./.github/actions/release-pypi | |
| - name: Github release | |
| id: github-release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ inputs.release-tag || github.ref_name }} | |
| files: dist/* | |
| fail_on_unmatched_files: true | |
| generate_release_notes: ${{ startsWith(github.ref, 'refs/tags/') }} |