-
Notifications
You must be signed in to change notification settings - Fork 442
125 lines (125 loc) · 3.98 KB
/
release_finalize.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
---
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
# 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
deprecate-docs-gitbook-legacy:
needs: order-gitbook-release-spaces
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 legacy docs branch
- name: Checkout code
uses: actions/[email protected]
with:
ref: docs/legacy-docs-page
# Append new version to the legacy docs table
- name: Update legacy docs file
shell: bash
run: |-
bash scripts/deprecate-previous-docs-to-legacy.sh ${{ github.event.inputs.latest_version }}