release-finalize #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: release-finalize | |
on: | |
workflow_dispatch: | |
inputs: | |
latest_version: | |
description: The latest version of ZenML | |
required: true | |
type: string | |
new_version: | |
description: The new version of ZenML | |
required: true | |
type: string | |
env: | |
ZENML_ANALYTICS_OPT_IN: false | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
create-release-branch: | |
runs-on: ubuntu-latest | |
steps: | |
# Configure Git | |
- name: Configure git | |
shell: bash | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "ZenML GmbH" | |
# Check out develop | |
- name: Checkout code | |
uses: actions/[email protected] | |
with: | |
ref: develop | |
# Create the release branch | |
- name: Release branch | |
run: | | |
git pull | |
git checkout -b release/${{ github.event.inputs.new_version }} | |
git push --set-upstream origin release/${{ github.event.inputs.new_version }} | |
add-docs-warning-header: | |
runs-on: ubuntu-latest | |
steps: | |
# Configure Git | |
- name: Configure git | |
shell: bash | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "ZenML GmbH" | |
# Check out the previous release branch | |
- name: Checkout code | |
uses: actions/[email protected] | |
with: | |
ref: release/${{ github.event.inputs.latest_version }} | |
# Create the docs update PR | |
- name: Create docs update PR | |
shell: bash | |
run: | | |
git pull | |
bash scripts/add-docs-warning.sh ${{ github.event.inputs.latest_version }} | |
add-new-version-to-migration-tests: | |
runs-on: ubuntu-latest | |
steps: | |
# Configure Git | |
- name: Configure git | |
shell: bash | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "ZenML GmbH" | |
# Check out develop | |
- name: Checkout code | |
uses: actions/[email protected] | |
with: | |
ref: develop | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.12' | |
- name: Install ZenML | |
run: | | |
scripts/install-zenml-dev.sh --system --integrations "no" | |
# Create the migration test version if necessary | |
- name: Create docs update PR | |
shell: bash | |
run: |- | |
git pull | |
bash scripts/add-migration-test-version.sh ${{ github.event.inputs.latest_version }} ${{ github.event.inputs.new_version }} | |
order-gitbook-release-spaces: | |
runs-on: ubuntu-latest | |
steps: | |
# Check out develop | |
- name: Checkout code | |
uses: actions/[email protected] | |
with: | |
ref: develop | |
# Setting up the Python | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.12' | |
# Install requests | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests | |
# Adjust the docs | |
- name: Adjust gitbook docs | |
env: | |
ZENML_NEW_VERSION: ${{ github.event.inputs.new_version }} | |
ZENML_OLD_VERSION: ${{ github.event.inputs.latest_version }} | |
GITBOOK_API_KEY: ${{secrets.GITBOOK_API_KEY}} | |
GITBOOK_ORGANIZATION: ${{secrets.GITBOOK_ORGANIZATION}} | |
GITBOOK_DOCS_COLLECTION: ${{secrets.GITBOOK_DOCS_COLLECTION}} | |
GITBOOK_LEGACY_COLLECTION: ${{secrets.GITBOOK_LEGACY_COLLECTION}} | |
run: python scripts/sync-gitbook-release-spaces.py |