| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,49 +1,50 @@ | ||
| --- | ||
| name: Setup Environment | ||
| description: Install uv, configure the system python, and the package dependencies | ||
|
|
||
| inputs: | ||
| uv-install-options: | ||
| default: "" | ||
| uv-version: | ||
| default: 0.4.16 | ||
| default: 0.9.16 | ||
| python-version: | ||
| required: true | ||
| cache-pre-commit: | ||
| default: false | ||
| cache-version: | ||
| default: "v0.1" | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v3 | ||
| - name: Setup uv | ||
| id: setup-uv | ||
| uses: astral-sh/setup-uv@v7 | ||
| with: | ||
| enable-cache: true | ||
|
|
||
| - name: "Setup python" | ||
| uses: "actions/setup-python@v5" | ||
| - name: Setup Python | ||
| id: setup-python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: "${{ inputs.python-version }}" | ||
| python-version: ${{ inputs.python-version }} | ||
| allow-prereleases: true | ||
|
|
||
| - name: "Install project" | ||
| - name: Install Project Dependencies | ||
| id: install-project-dependencies | ||
| shell: bash | ||
| run: | | ||
| uv sync ${{ inputs.uv-install-options }} | ||
|
|
||
| - name: Read pre-commit version | ||
| if: inputs.cache-pre-commit == 'true' | ||
| - name: Read pre-commit Version | ||
| id: pre-commit-version | ||
| if: inputs.cache-pre-commit == 'true' | ||
| shell: bash | ||
| run: >- | ||
| echo "pre-commit-version=$(uv run pre-commit -V | awk '{print $2}')" >> $GITHUB_OUTPUT | ||
|
|
||
| - uses: actions/cache@v4 | ||
| - name: pre-commit Cache | ||
| id: pre-commit-cache | ||
| if: inputs.cache-pre-commit == 'true' | ||
| name: Pre-commit cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cache/pre-commit/ | ||
| key: cache-${{ inputs.cache-version }}-${{ runner.os }}-${{ runner.arch }}-pre-commit-${{ steps.pre-commit-version.outputs.pre-commit-version }}-python-${{ inputs.python-version }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('.pre-commit-config.yaml') }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,33 +1,40 @@ | ||
| name: Publish packages | ||
| --- | ||
| name: Publish Packages | ||
|
|
||
| on: | ||
| release: | ||
| types: [published] | ||
|
|
||
| env: | ||
| UV_VERSION: 0.4.16 | ||
| PYTHON_VERSION: 3.12 | ||
| UV_VERSION: 0.9.16 | ||
| PYTHON_VERSION: 3.13 | ||
|
|
||
| jobs: | ||
| build-n-publish: | ||
| name: Build release packages | ||
| name: Build Release Packages | ||
| runs-on: ubuntu-latest | ||
| permissions: # for trusted publishing | ||
| permissions: | ||
| id-token: write | ||
|
|
||
| steps: | ||
| - name: Checkout source files | ||
| uses: actions/checkout@v4 | ||
| - name: Checkout Source Files | ||
| id: checkout | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v3 | ||
| - name: Setup uv | ||
| id: setup-uv | ||
| uses: astral-sh/setup-uv@v7 | ||
|
|
||
| - name: Setup python | ||
| uses: actions/setup-python@v4 | ||
| - name: Setup Python | ||
| id: setup-python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: ${{ env.PYTHON_VERSION }} | ||
|
|
||
| - name: Build a binary wheel and a source tarball | ||
| - name: Build Packages | ||
| id: build-packages | ||
| shell: bash | ||
| run: uv build | ||
|
|
||
| - name: Publish release on pypi | ||
| - name: Publish Release on PyPI | ||
| id: publish-release-on-pypi | ||
| uses: pypa/gh-action-pypi-publish@release/v1 |
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.