mirror of
https://github.com/deepset-ai/haystack.git
synced 2026-01-03 18:48:27 +00:00
58 lines
1.9 KiB
YAML
58 lines
1.9 KiB
YAML
name: Minor Version Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
PYTHON_VERSION: "3.8"
|
|
|
|
jobs:
|
|
sync:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout this repo
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Define all versions
|
|
id: versions
|
|
shell: bash
|
|
# We only need `major.minor` in Readme so we cut the full version string to the first two tokens
|
|
run: |
|
|
echo "current_release_minor=$(cut -d "." -f 1,2 < VERSION.txt)" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Create new version branch
|
|
run: |
|
|
git config --global user.name "github-actions[bot]"
|
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
git checkout -b v${{ steps.versions.outputs.current_release_minor }}.x
|
|
git push -u origin v${{ steps.versions.outputs.current_release_minor }}.x
|
|
|
|
- name: Bump version on main
|
|
shell: bash
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
git checkout main
|
|
NEW_VERSION=$(awk -F. '/[0-9]+\./{$2++;print}' OFS=. < VERSION.txt)
|
|
echo "$NEW_VERSION" > VERSION.txt
|
|
cat VERSION.txt
|
|
git checkout -b bump-version
|
|
git add .
|
|
git commit -m "Update unstable version"
|
|
git push -u origin bump-version
|
|
gh pr create -B main -H bump-version --title 'Bump unstable version' --body 'Part of the release process' --label 'ignore-for-release-notes'
|
|
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
|
|
- name: Install release_docs.py dependencies
|
|
run: pip install requests
|
|
|
|
- name: Release Readme version
|
|
env:
|
|
RDME_API_KEY: ${{ secrets.README_API_KEY }}
|
|
run: |
|
|
git checkout main
|
|
python ./.github/utils/release_docs.py --new-version ${{ steps.versions.outputs.current_release_minor }}
|