chore: update post update release (#2235)

* chore: fix uv lock after update

(cherry picked from commit 29137d673e)

* chore(docs): fix postupdate

(cherry picked from commit 3a6fb0179a1183ed60b8ca28bdff248aa1358df4)

* chore(docs): use node 24

(cherry picked from commit 3c30538a32)

* chore(build): copy version.txt

(cherry picked from commit bb1ea2f1d6)
This commit is contained in:
Javier Martinez
2026-06-02 19:52:00 +02:00
committed by GitHub
parent 183cd03857
commit d3954dbb6f
6 changed files with 53 additions and 10 deletions

View File

@@ -14,6 +14,11 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
- name: Install Fern
run: npm install -g fern-api

View File

@@ -36,6 +36,34 @@ jobs:
run: |
git config user.email "ci@zylon.ai"
git config user.name "Zylon CI"
git add docs/openapi/openapi.json
git add fern/openapi/openapi.json
git diff --staged --quiet || git commit -m "docs: update OpenAPI spec for ${{ steps.update-openapi.outputs.version }}"
git push
update-uv-lock:
runs-on: ubuntu-latest
if: github.head_ref == 'release-please--branches--main' || github.ref_name == 'release-please--branches--main'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref || github.ref_name }}
token: ${{ secrets.PAT || github.token }}
- name: Install dependencies
uses: ./.github/workflows/actions/install_dependencies
- name: Refresh uv.lock
id: update-uv-lock
run: |
version=$(cat version.txt)
uv lock
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: Commit and push changes
run: |
git config user.email "ci@zylon.ai"
git config user.name "Zylon CI"
git add uv.lock
git diff --staged --quiet || git commit -m "build: update uv.lock for ${{ steps.update-uv-lock.outputs.version }}"
git push

View File

@@ -24,7 +24,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
node-version: "24"
- name: Install Fern
run: npm install -g fern-api

View File

@@ -14,8 +14,10 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
- name: Download Fern
run: npm install -g fern-api

View File

@@ -1,8 +1,15 @@
from __future__ import annotations
from importlib.metadata import PackageNotFoundError, version
from pathlib import Path
def get_version() -> str:
with open("version.txt", "r+") as version_file:
try:
return version("private-gpt")
except PackageNotFoundError:
version_file = Path(__file__).resolve().parents[2] / "version.txt"
try:
release_version = version_file.read()
version_file.close()
return release_version
except OSError as e:
raise ImportError("Version file not found") from e
return version_file.read_text(encoding="utf-8").strip()
except OSError as exc:
raise ImportError("Version metadata not found") from exc

View File

@@ -348,6 +348,7 @@ packages = ["private_gpt"]
[tool.hatch.build.targets.wheel.force-include]
"settings.yaml" = "settings.yaml"
"version.txt" = "version.txt"
"ui" = "ui"
"scripts" = "scripts"