[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:
Massimiliano Pippi 2022-10-31 12:26:48 +01:00 committed by GitHub
parent 54cc9cd4cf
commit 17cd79e2c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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'