Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:

env:
UPSTREAM_REPO: astral-sh/python-build-standalone
UPSTREAM_TAG: "20260901"
PYTHON_VERSION: "3.14"
BUILD_OPTIONS: "pgo+lto"

Expand All @@ -22,11 +21,15 @@ jobs:
with:
path: patch-repo

- name: Read UPSTREAM_TAG
id: upstream_tag
run: echo "tag=$(cat patch-repo/UPSTREAM_TAG)" >> "$GITHUB_OUTPUT"

- name: Checkout upstream python-build-standalone
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: ${{ env.UPSTREAM_REPO }}
ref: ${{ env.UPSTREAM_TAG }}
ref: ${{ steps.upstream_tag.outputs.tag }}
path: python-build-standalone

- name: Apply no-libdb patch
Expand Down Expand Up @@ -106,11 +109,15 @@ jobs:
with:
path: patch-repo

- name: Read UPSTREAM_TAG
id: upstream_tag
run: echo "tag=$(cat patch-repo/UPSTREAM_TAG)" >> "$GITHUB_OUTPUT"

- name: Checkout upstream python-build-standalone
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: ${{ env.UPSTREAM_REPO }}
ref: ${{ env.UPSTREAM_TAG }}
ref: ${{ steps.upstream_tag.outputs.tag }}
path: python-build-standalone

- name: Apply no-libdb patch
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/update_upstream.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Update upstream tag
name: update tag

on:
workflow_dispatch:
Expand All @@ -24,13 +24,13 @@ jobs:
latest=$(gh release view --repo astral-sh/python-build-standalone --json tagName --jq '.tagName')
echo "tag=$latest" >> "$GITHUB_OUTPUT"

- name: Get current tag from build.yml
- name: Get current tag from UPSTREAM_TAG file
id: current
run: |
current=$(grep 'UPSTREAM_TAG:' .github/workflows/build.yml | sed 's/.*UPSTREAM_TAG: *"\(.*\)".*/\1/')
current=$(cat UPSTREAM_TAG)
echo "tag=$current" >> "$GITHUB_OUTPUT"

- name: Update build.yml if outdated
- name: Update UPSTREAM_TAG file if outdated
id: changes
run: |
latest="${{ steps.upstream.outputs.tag }}"
Expand All @@ -43,7 +43,7 @@ jobs:
fi

echo "Updating UPSTREAM_TAG from $current to $latest"
sed -i "s/UPSTREAM_TAG: \"${current}\"/UPSTREAM_TAG: \"${latest}\"/" .github/workflows/build.yml
echo "$latest" > UPSTREAM_TAG
echo "has_changes=true" >> "$GITHUB_OUTPUT"
echo "latest=$latest" >> "$GITHUB_OUTPUT"
echo "current=$current" >> "$GITHUB_OUTPUT"
Expand All @@ -70,12 +70,12 @@ jobs:
fi

git checkout -b "${branch}"
git add .github/workflows/build.yml
git add UPSTREAM_TAG
git commit -s -m "chore: update UPSTREAM_TAG from ${current} to ${latest}"
git push origin "${branch}" -f

gh pr create \
--base main \
--head "${branch}" \
--title "chore: update UPSTREAM_TAG from ${current} to ${latest}" \
--body "Automated update of \`UPSTREAM_TAG\` in \`build.yml\` from \`${current}\` to \`${latest}\` from [astral-sh/python-build-standalone](https://github.com/astral-sh/python-build-standalone/releases/tag/${latest})."
--body "Automated update of \`UPSTREAM_TAG\` from \`${current}\` to \`${latest}\` from [astral-sh/python-build-standalone](https://github.com/astral-sh/python-build-standalone/releases/tag/${latest})."
1 change: 1 addition & 0 deletions UPSTREAM_TAG
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20260924
Loading