mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-12-28 15:38:36 +00:00
[release process] Create new schema when bumping unstable (#3416)
* also create new schema when bumping unstable version * openapi schema * no need to update the json schema anymore
This commit is contained in:
parent
54cc9cd4cf
commit
17cd79e2c8
37
.github/workflows/minor_version_release.yml
vendored
37
.github/workflows/minor_version_release.yml
vendored
@ -11,46 +11,40 @@ jobs:
|
||||
- name: Checkout this repo
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python 3.8
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pydoc-markdown==4.5.1
|
||||
- name: Setup Python
|
||||
uses: ./.github/actions/python_cache/
|
||||
|
||||
- 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: |
|
||||
git fetch
|
||||
git checkout main
|
||||
echo "::set-output name=current_release_minor::$(cat VERSION.txt | cut -d "." -f 1,2)"
|
||||
|
||||
- name: Create new version branch
|
||||
run: |
|
||||
git checkout -b v${{ steps.versions.outputs.current_release_minor }}.x
|
||||
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
|
||||
id: bump-version
|
||||
shell: bash
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
git fetch
|
||||
git checkout main
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git pull
|
||||
cat VERSION.txt | awk -F. '/[0-9]+\./{$2++;print}' OFS=. | tee VERSION.txt
|
||||
cat VERSION.txt
|
||||
pip install --upgrade pip
|
||||
pip install .[all]
|
||||
pip install ./rest_api
|
||||
python .github/utils/generate_openapi_specs.py
|
||||
git checkout -b bump-version
|
||||
git add ./VERSION.txt
|
||||
git commit -m "Bump version"
|
||||
git add .
|
||||
git commit -m "Update unstable version and openapi schema"
|
||||
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'
|
||||
|
||||
# Note that patch versions all sync to the one readme minor version
|
||||
# e.g. Haystack 1.9.1 and 1.9.2 both map to Readme 1.9
|
||||
@ -68,8 +62,3 @@ jobs:
|
||||
git add .
|
||||
git commit -m "Update API docs headers and readme_api_sync.yml to sync to new version"
|
||||
git push
|
||||
|
||||
- name: Create Pull Request
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: gh pr create -B main -H bump-version --title 'Bump unstable version' --body 'Created by Github action'
|
||||
Loading…
x
Reference in New Issue
Block a user