Repository navigation
81 lines (74 loc) · 3.08 KB
/
Copy pathsync-python-releases.yml
File metadata and controls
81 lines (74 loc) · 3.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Sync Python releases and create a pull request.
#
# Based on: https://github.com/astral-sh/rye/blob/57b7c089e494138aae29a130afb2e17f447970bf/.github/workflows/sync-python-releases.yml
name: "Sync Python downloads"
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
permissions: {}
env:
UV_LOCKED: 1
jobs:
sync:
if: github.repository == 'astral-sh/uv'
runs-on: ${{ github.repository_owner == 'astral-sh' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
environment:
name: automations
deployment: false
permissions:
contents: read
id-token: write # for the credential broker
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
with:
# renovate: datasource=github-release-attachments depName=astral-sh/uv
version: "0.13.5"
checksum: "f68d291c75783122dad58ab77def0e13f3233f358731db5d6d7e8715603b928f"
enable-cache: true
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
save-if: false
- name: Sync Python Releases
run: uv run --locked --python 3.12 --no-build --script fetch-download-metadata.py
working-directory: ./crates/uv-python-managed
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Sync Sysconfig Targets
run: ./sync_sysconfig_targets.sh
working-directory: ./crates/uv-dev
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Update Python version constants"
run: uv run --locked --python 3.12 --no-build --script scripts/sync-python-version-constants.py
- name: "Get uv token"
id: token
uses: astral-sh/github-actions/simple-token-service@eb81cf4d13127c3f9539f621c17e4c65327636c8
with:
exchange-url: ${{ secrets.STS_API_URL }}/exchange
audience: ${{ secrets.STS_API_URL }}
repository: astral-sh/uv
permissions: |
contents: write
pull_requests: write
- name: "Create Pull Request"
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
token: ${{ steps.token.outputs.token }}
commit-message: "Sync latest Python releases"
committer: "astral-automations-bot[bot] <305554984+astral-automations-bot[bot]@users.noreply.github.com>"
author: "astral-automations-bot[bot] <305554984+astral-automations-bot[bot]@users.noreply.github.com>"
add-paths: |
.python-versions
crates/uv-python-managed/download-metadata.json
crates/uv-dev/src/generate_sysconfig_mappings.rs
crates/uv-python-managed/src/sysconfig/generated_mappings.rs
crates/uv-test/src/lib.rs
branch: "sync-python-releases"
title: "Sync latest Python releases"
body: "Automated update for Python releases."
base: "main"
draft: true