Files
uv/.github/workflows/publish-docs.yml
T
renovate[bot] afd816f3cd Update astral-sh/setup-uv action to v7.5.0 (#18432)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [astral-sh/setup-uv](https://redirect.github.com/astral-sh/setup-uv) |
action | minor | `v7.3.1` → `v7.5.0` |

---

### Release Notes

<details>
<summary>astral-sh/setup-uv (astral-sh/setup-uv)</summary>

###
[`v7.5.0`](https://redirect.github.com/astral-sh/setup-uv/releases/tag/v7.5.0):
🌈 Use &#x60;astral-sh/versions&#x60; as version provider

[Compare
Source](https://redirect.github.com/astral-sh/setup-uv/compare/v7.4.0...v7.5.0)

### No more rate-limits

This release addresses a long-standing source of timeouts and rate-limit
failures in setup-uv.

Previously, the action resolved version identifiers like 0.5.x by
iterating over available uv releases via the GitHub API to find the best
match. In contrast, latest and exact versions such as 0.5.0 skipped
version resolution entirely and downloaded uv directly.

The `manifest-file` input was an earlier attempt to improve this. It
allows providing an url to a file that lists available versions,
checksums, and even custom download URLs. The action also shipped with
such a manifest.
However, because that bundled file could become outdated whenever new uv
releases were published, the action still had to fall back to the GitHub
API in many cases.

This release solves the problem by sourcing version data from Astral’s
versions repository via the raw content endpoint:


<https://raw.githubusercontent.com/astral-sh/versions/refs/heads/main/v1/uv.ndjson>

By using the raw endpoint instead of the GitHub API, version resolution
no longer depends on API authentication and is much less likely to run
into rate limits or timeouts.

***

> \[!TIP]
> The next section is only interesting for users of the `manifest-file`
input

The `manifest-file` input lets you override that source with your own
URL, for example to test custom uv builds or alternate download
locations.

The manifest file must be in NDJSON format, where each line is a JSON
object representing a version and its artifacts. For example:

```json
{"version":"0.10.7","artifacts":[{"platform":"x86_64-unknown-linux-gnu","variant":"default","url":"https://example.com/uv-x86_64-unknown-linux-gnu.tar.gz","archive_format":"tar.gz","sha256":"..."}]}
{"version":"0.10.6","artifacts":[{"platform":"x86_64-unknown-linux-gnu","variant":"default","url":"https://example.com/uv-x86_64-unknown-linux-gnu.tar.gz","archive_format":"tar.gz","sha256":"..."}]}
```

> \[!WARNING]\
> The old format still works but is deprecated. A warning will be logged
when you use it.

#### Changes

- docs: replace copilot instructions with AGENTS.md
[@&#8203;eifinger](https://redirect.github.com/eifinger)
([#&#8203;794](https://redirect.github.com/astral-sh/setup-uv/issues/794))

#### 🚀 Enhancements

- Use astral-sh/versions as primary version provider
[@&#8203;eifinger](https://redirect.github.com/eifinger)
([#&#8203;802](https://redirect.github.com/astral-sh/setup-uv/issues/802))

#### 📚 Documentation

- docs: add cross-client dependabot rollup skill
[@&#8203;eifinger](https://redirect.github.com/eifinger)
([#&#8203;793](https://redirect.github.com/astral-sh/setup-uv/issues/793))

###
[`v7.4.0`](https://redirect.github.com/astral-sh/setup-uv/releases/tag/v7.4.0):
🌈 Add riscv64 architecture support to platform detection

[Compare
Source](https://redirect.github.com/astral-sh/setup-uv/compare/v7.3.1...v7.4.0)

##### Changes

Thank you [@&#8203;luhenry](https://redirect.github.com/luhenry) for
adding support for riscv64 arch

##### 🚀 Enhancements

- Add riscv64 architecture support to platform detection
[@&#8203;luhenry](https://redirect.github.com/luhenry)
([#&#8203;791](https://redirect.github.com/astral-sh/setup-uv/issues/791))

##### 🧰 Maintenance

- Delete .github/workflows/dependabot-build.yml
[@&#8203;eifinger](https://redirect.github.com/eifinger)
([#&#8203;789](https://redirect.github.com/astral-sh/setup-uv/issues/789))
- Harden Dependabot build workflow
[@&#8203;eifinger](https://redirect.github.com/eifinger)
([#&#8203;788](https://redirect.github.com/astral-sh/setup-uv/issues/788))
- Fix: check PR author instead of event sender for Dependabot detection
[@&#8203;eifinger-bot](https://redirect.github.com/eifinger-bot)
([#&#8203;787](https://redirect.github.com/astral-sh/setup-uv/issues/787))
- chore: update known checksums for 0.10.9
@&#8203;[github-actions\[bot\]](https://redirect.github.com/apps/github-actions)
([#&#8203;783](https://redirect.github.com/astral-sh/setup-uv/issues/783))
- Add workflow to auto-build dist on Dependabot PRs
[@&#8203;eifinger-bot](https://redirect.github.com/eifinger-bot)
([#&#8203;782](https://redirect.github.com/astral-sh/setup-uv/issues/782))
- chore: update known checksums for 0.10.8
@&#8203;[github-actions\[bot\]](https://redirect.github.com/apps/github-actions)
([#&#8203;779](https://redirect.github.com/astral-sh/setup-uv/issues/779))
- chore: update known checksums for 0.10.7
@&#8203;[github-actions\[bot\]](https://redirect.github.com/apps/github-actions)
([#&#8203;775](https://redirect.github.com/astral-sh/setup-uv/issues/775))

##### ⬆️ Dependency updates

- chore(deps): bump versions
[@&#8203;eifinger](https://redirect.github.com/eifinger)
([#&#8203;792](https://redirect.github.com/astral-sh/setup-uv/issues/792))
- Bump actions/setup-node from 6.2.0 to 6.3.0
@&#8203;[dependabot\[bot\]](https://redirect.github.com/apps/dependabot)
([#&#8203;790](https://redirect.github.com/astral-sh/setup-uv/issues/790))
- Bump eifinger/actionlint-action from 1.10.0 to 1.10.1
@&#8203;[dependabot\[bot\]](https://redirect.github.com/apps/dependabot)
([#&#8203;778](https://redirect.github.com/astral-sh/setup-uv/issues/778))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, only on
Monday ( * 0-3 * * 1 ) (UTC), Automerge - At any time (no schedule
defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/astral-sh/uv).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My41OS4wIiwidXBkYXRlZEluVmVyIjoiNDMuNTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiYnVpbGQ6c2tpcC1kb2NrZXIiLCJidWlsZDpza2lwLXJlbGVhc2UiLCJpbnRlcm5hbCJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-03-13 07:51:23 +00:00

142 lines
4.7 KiB
YAML

# Publish the uv documentation.
#
# Assumed to run as a subworkflow of .github/workflows/release.yml; specifically, as a post-announce
# job within `cargo-dist`.
name: mkdocs
on:
workflow_dispatch:
inputs:
ref:
description: "The commit SHA, tag, or branch to publish. Uses the default branch if not specified."
default: ""
type: string
workflow_call:
inputs:
plan:
required: true
type: string
permissions: {}
jobs:
mkdocs:
runs-on: ubuntu-latest
env:
VERSION: ${{ (inputs.plan != '' && fromJson(inputs.plan).announcement_tag) || inputs.ref }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ inputs.ref }}
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: 3.12
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
- name: "Generate reference documentation"
run: |
cargo dev generate-options-reference
cargo dev generate-cli-reference
cargo dev generate-env-vars-reference
- name: "Set docs display name"
run: |
version="${VERSION}"
# if version is missing, use 'latest'
if [ -z "$version" ]; then
echo "Using 'latest' as version"
version="latest"
fi
# Use version as display name for now
display_name="$version"
echo "DISPLAY_NAME=$display_name" >> $GITHUB_ENV
- name: "Set branch name"
run: |
version="${VERSION}"
display_name="${DISPLAY_NAME}"
timestamp="$(date +%s)"
# create branch_display_name from display_name by replacing all
# characters disallowed in git branch names with hyphens
branch_display_name="$(echo "$display_name" | tr -c '[:alnum:]._' '-' | tr -s '-')"
echo "BRANCH_NAME=update-docs-$branch_display_name-$timestamp" >> $GITHUB_ENV
echo "TIMESTAMP=$timestamp" >> $GITHUB_ENV
- name: "Install uv"
uses: astral-sh/setup-uv@e06108dd0aef18192324c70427afc47652e63a82 # v7.5.0
with:
version: "0.10.9"
- name: "Build docs"
run: uv run --only-group docs mkdocs build --strict -f mkdocs.yml
- name: "Clone docs repo"
run: |
version="${VERSION}"
git clone https://${ASTRAL_DOCS_PAT}@github.com/astral-sh/docs.git astral-docs
env:
ASTRAL_DOCS_PAT: ${{ secrets.ASTRAL_DOCS_PAT }}
- name: "Copy docs"
run: rm -rf astral-docs/site/uv && mkdir -p astral-docs/site && cp -r site/uv astral-docs/site/
- name: "Commit docs"
working-directory: astral-docs
run: |
branch_name="${BRANCH_NAME}"
git config user.name "astral-docs-bot"
git config user.email "176161322+astral-docs-bot@users.noreply.github.com"
git checkout -b $branch_name
git add site/uv
git commit -m "Update uv documentation for $version"
- name: "Create Pull Request"
working-directory: astral-docs
env:
GITHUB_TOKEN: ${{ secrets.ASTRAL_DOCS_PAT }}
run: |
version="${VERSION}"
display_name="${DISPLAY_NAME}"
branch_name="${BRANCH_NAME}"
# set the PR title
pull_request_title="Update uv documentation for $display_name"
# Delete any existing pull requests that are open for this version
# by checking against pull_request_title because the new PR will
# supersede the old one.
gh pr list --state open --json title --jq '.[] | select(.title == "$pull_request_title") | .number' | \
xargs -I {} gh pr close {}
# push the branch to GitHub
git push origin $branch_name
# create the PR
gh pr create --base main --head $branch_name \
--title "$pull_request_title" \
--body "Automated documentation update for $display_name" \
--label "documentation"
- name: "Merge Pull Request"
if: ${{ inputs.plan != '' && !fromJson(inputs.plan).announcement_tag_is_implicit }}
working-directory: astral-docs
env:
GITHUB_TOKEN: ${{ secrets.ASTRAL_DOCS_PAT }}
run: |
branch_name="${BRANCH_NAME}"
# auto-merge the PR if the build was triggered by a release. Manual builds should be reviewed by a human.
# give the PR a few seconds to be created before trying to auto-merge it
sleep 10
gh pr merge --squash $branch_name