Skip to content

Commit 4b39c4d

Browse files
julian-rischclaude
andauthored
ci: add manual pre-release workflow for v3 branch (#11336)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 861550f commit 4b39c4d

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Manual pre-release from v3 on PyPI
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
HATCH_VERSION: "1.16.5"
8+
9+
jobs:
10+
v3-release:
11+
runs-on: ubuntu-latest
12+
environment: pypi
13+
permissions:
14+
id-token: write
15+
steps:
16+
- name: Checkout v3
17+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18+
with:
19+
ref: v3
20+
fetch-depth: 1
21+
22+
# Reads VERSION.txt, strips any -rcN suffix, and appends .devYYYYMMDDHHMMSS
23+
# (e.g. 3.0.0.dev20260519000000) so each run gets a unique, PEP 440–valid pre-release version.
24+
- name: Set pre-release version
25+
id: set-version
26+
run: |
27+
BASE_VERSION=$(sed 's/-rc[0-9]*$//' VERSION.txt)
28+
TIMESTAMP=$(date +%Y%m%d%H%M%S)
29+
PRERELEASE_VERSION="${BASE_VERSION}.dev${TIMESTAMP}"
30+
echo "version=${PRERELEASE_VERSION}" >> "$GITHUB_OUTPUT"
31+
echo "${PRERELEASE_VERSION}" > VERSION.txt
32+
echo "Building haystack-ai version: ${PRERELEASE_VERSION}"
33+
34+
- name: Install Hatch
35+
run: |
36+
python -m pip install --upgrade pip
37+
pip install hatch==${{ env.HATCH_VERSION }} --uploaded-prior-to=P1D
38+
39+
- name: Build Haystack
40+
run: hatch build
41+
42+
- name: Publish to PyPI
43+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0

0 commit comments

Comments
 (0)