Skip to content
Merged
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
43 changes: 43 additions & 0 deletions .github/workflows/v3_pypi_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Manual pre-release from v3 on PyPI

on:
workflow_dispatch:

env:
HATCH_VERSION: "1.16.5"

jobs:
v3-release:
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- name: Checkout v3
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: v3
fetch-depth: 1

# Reads VERSION.txt, strips any -rcN suffix, and appends .devYYYYMMDDHHMMSS
# (e.g. 3.0.0.dev20260519000000) so each run gets a unique, PEP 440–valid pre-release version.
- name: Set pre-release version
id: set-version
run: |
BASE_VERSION=$(sed 's/-rc[0-9]*$//' VERSION.txt)
TIMESTAMP=$(date +%Y%m%d%H%M%S)
PRERELEASE_VERSION="${BASE_VERSION}.dev${TIMESTAMP}"
echo "version=${PRERELEASE_VERSION}" >> "$GITHUB_OUTPUT"
echo "${PRERELEASE_VERSION}" > VERSION.txt
echo "Building haystack-ai version: ${PRERELEASE_VERSION}"

- name: Install Hatch
run: |
python -m pip install --upgrade pip
pip install hatch==${{ env.HATCH_VERSION }} --uploaded-prior-to=P1D

- name: Build Haystack
run: hatch build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
Loading