diff --git a/.github/workflows/minor_version_release.yml b/.github/workflows/minor_version_release.yml index 35b1a80e5..c0e01f855 100644 --- a/.github/workflows/minor_version_release.yml +++ b/.github/workflows/minor_version_release.yml @@ -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' \ No newline at end of file