c56bef871b
Sync docs with Docusaurus / sync (push) Waiting to run
Tests / Check if changed (push) Waiting to run
Tests / format (push) Blocked by required conditions
Tests / check-imports (push) Blocked by required conditions
Tests / Unit / macos-latest (push) Blocked by required conditions
Tests / Unit / ubuntu-latest (push) Blocked by required conditions
Tests / Unit / windows-latest (push) Blocked by required conditions
Tests / mypy (push) Blocked by required conditions
Tests / Integration / ubuntu-latest (push) Blocked by required conditions
Tests / Integration / macos-latest (push) Blocked by required conditions
Tests / Integration / windows-latest (push) Blocked by required conditions
Tests / notify-slack-on-failure (push) Blocked by required conditions
Tests / Mark tests as completed (push) Blocked by required conditions
Docker image release / Build base image (push) Waiting to run
CodeQL / Analyze (python) (push) Has been cancelled
Update Platform Components Table / update (push) Has been cancelled
66 lines
2.6 KiB
YAML
66 lines
2.6 KiB
YAML
name: Release new minor version docs
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
# Trigger this only for new minor version tags (e.g. v2.99.0)
|
|
- "v[0-9]+.[0-9]+.0"
|
|
# Exclude 1.x tags
|
|
- "!v1.[0-9]+.[0-9]+"
|
|
|
|
env:
|
|
PYTHON_VERSION: "3.10"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
promote:
|
|
runs-on: ubuntu-slim
|
|
steps:
|
|
- name: Checkout this repo
|
|
# use VERSION.txt file from main branch
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
persist-credentials: false
|
|
ref: main
|
|
|
|
- name: Get version to release
|
|
id: version
|
|
shell: bash
|
|
# We only need `major.minor`. At this point, VERSION.txt contains the next version.
|
|
# For example, if we are releasing 2.20.0, VERSION.txt contains 2.21.0-rc0.
|
|
run: |
|
|
MAJOR=$(cut -d "." -f 1 < VERSION.txt)
|
|
MINOR=$(cut -d "." -f 2 < VERSION.txt)
|
|
MINOR=$((MINOR - 1))
|
|
echo "version=${MAJOR}.${MINOR}" >> "$GITHUB_OUTPUT"
|
|
|
|
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
|
with:
|
|
python-version: "${{ env.PYTHON_VERSION }}"
|
|
|
|
- name: Promote unstable docs for Docusaurus
|
|
run: |
|
|
python ./.github/utils/promote_unstable_docs_docusaurus.py --version ${{ steps.version.outputs.version }}
|
|
|
|
- name: Create Pull Request with Docusaurus docs updates
|
|
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
|
|
with:
|
|
token: ${{ secrets.HAYSTACK_BOT_TOKEN }}
|
|
commit-message: "Promote unstable docs for Haystack ${{ steps.version.outputs.version }}"
|
|
branch: promote-unstable-docs-${{ steps.version.outputs.version }}
|
|
base: main
|
|
title: "docs: promote unstable docs for Haystack ${{ steps.version.outputs.version }}"
|
|
add-paths: |
|
|
docs-website
|
|
body: |
|
|
This PR promotes the unstable docs for Haystack ${{ steps.version.outputs.version }} to stable.
|
|
It is expected to run at the time of the release.
|
|
You can inspect the docs preview and merge it. There should now be only one unstable version representing the next (main) branch.
|
|
# This workflow is triggered by a tag pushed by the HaystackBot in release.yml > create-release-tag.
|
|
# GitHub requires reviewers to be different from the PR author, so setting `github.actor`
|
|
# would fail (it would request a review from the HaystackBot itself).
|
|
# So we don't set any reviewers and instead notify the Release Manager
|
|
# (see .github/utils/prepare_release_notification.sh).
|