6
description: 'Release type'
16
shell: bash --noprofile --norc -exo pipefail {0}
20
OPENLLM_DO_NOT_TRACK: True
25
if: github.repository_owner == 'bentoml'
26
runs-on: ubuntu-latest
31
version: ${{ steps.version.outputs.version }}
33
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # ratchet:actions/checkout@v4.1.1
36
token: ${{ secrets.OPENLLM_PAT }}
37
- uses: bentoml/setup-bentoml-action@862aa8fa0e0c3793fcca4bfe7a62717a497417e4 # ratchet:bentoml/setup-bentoml-action@v1
39
bentoml-version: 'main'
40
python-version-file: .python-version-default
41
- name: Import bot's GPG key for signing commits
43
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # ratchet:crazy-max/ghaction-import-gpg@v6
45
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
46
passphrase: ${{ secrets.GPG_PASSPHRASE }}
47
git_config_global: true
48
git_user_signingkey: true
49
git_commit_gpgsign: true
51
- name: Install jq and curl
52
run: sudo apt-get install -y jq curl
53
- name: Create a release
55
GIT_AUTHOR_NAME: ${{ steps.import-gpg.outputs.name }}
56
GIT_AUTHOR_EMAIL: ${{ steps.import-gpg.outputs.email }}
57
GIT_COMMITTER_NAME: ${{ steps.import-gpg.outputs.name }}
58
GIT_COMMITTER_EMAIL: ${{ steps.import-gpg.outputs.email }}
59
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61
pip install ghapi inflection tomlkit orjson
62
./.github/actions/release.sh --release ${{ inputs.release_type }}
63
- name: Set project version
66
version="$(git describe --tags "$(git rev-list --tags --max-count=1)")"
67
echo "Release version: $version"
68
echo "version=$version" >> $GITHUB_OUTPUT
70
if: github.repository_owner == 'bentoml'
73
name: Compile PyPI distribution for OpenLLM
74
uses: bentoml/OpenLLM/.github/workflows/build-pypi.yml@main # ratchet:exclude
76
tags: ${{ needs.release.outputs.version }}
80
runs-on: ubuntu-latest
84
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # ratchet:actions/checkout@v4.1.1
86
ref: '${{ needs.release.outputs.version }}'
87
token: ${{ secrets.OPENLLM_PAT }}
88
# NOTE: Keep this section in sync with build-pypi.yml
89
- name: Download Python artifacts
90
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # ratchet:actions/download-artifact@v3
92
name: python-artefacts
94
- name: Smoke test compiled artefacts
96
- name: Publish to PyPI
97
uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf # ratchet:pypa/gh-action-pypi-publish@release/v1
100
prepare-next-dev-cycle:
104
- binary-distribution
105
runs-on: ubuntu-latest
110
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # ratchet:actions/checkout@v4.1.1
114
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # ratchet:actions/setup-python@v5.0.0
116
python-version-file: .python-version-default
117
- name: Install dependencies
118
run: pip install hatch towncrier
119
- name: Install jq and curl
120
run: sudo apt-get install -y jq curl
121
- name: Import bot's GPG key for signing commits
123
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # ratchet:crazy-max/ghaction-import-gpg@v6
125
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
126
passphrase: ${{ secrets.GPG_PASSPHRASE }}
127
git_config_global: true
128
git_user_signingkey: true
129
git_commit_gpgsign: true
130
git_tag_gpgsign: true
131
- name: Bump version to dev
133
GIT_AUTHOR_NAME: ${{ steps.import-gpg-key.outputs.name }}
134
GIT_AUTHOR_EMAIL: ${{ steps.import-gpg-key.outputs.email }}
135
GIT_COMMITTER_NAME: ${{ steps.import-gpg-key.outputs.name }}
136
GIT_COMMITTER_EMAIL: ${{ steps.import-gpg-key.outputs.email }}
138
git pull --autostash --no-edit --gpg-sign --ff origin main
139
SEMVER="${{ needs.release.outputs.version }}"
143
read -ra VERSION_BITS <<< "$SEMVER"
145
VNUM1=${VERSION_BITS[0]}
146
VNUM2=${VERSION_BITS[1]}
147
VNUM3=${VERSION_BITS[2]}
149
DEV_VERSION="$VNUM1.$VNUM2.$VNUM3.dev0"
150
echo "Bumping version to ${DEV_VERSION}..."
151
jq --arg release_version "${DEV_VERSION}" '.version = $release_version' < package.json > package.json.tmp && mv package.json.tmp package.json
152
pushd openllm-node &>/dev/null
153
jq --arg release_version "${DEV_VERSION}" '.version = $release_version' < package.json > package.json.tmp && mv package.json.tmp package.json
155
git add package.json openllm-node/package.json && git commit -S -sm "infra: bump to dev version of ${DEV_VERSION} [generated] [skip ci]"
156
git push origin HEAD:main
158
if: github.repository_owner == 'bentoml'
160
name: Create binary/wheels distribution
161
uses: bentoml/OpenLLM/.github/workflows/binary-releases.yml@main # ratchet:exclude
163
if: github.repository_owner == 'bentoml'
167
- binary-distribution
168
name: Create release notes and setup for next cycle
169
uses: bentoml/OpenLLM/.github/workflows/release-notes.yml@main # ratchet:exclude
171
tags: ${{ needs.release.outputs.version }}
175
- prepare-next-dev-cycle
177
runs-on: ubuntu-latest
182
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # ratchet:actions/checkout@v4.1.1
185
- uses: bentoml/setup-bentoml-action@862aa8fa0e0c3793fcca4bfe7a62717a497417e4 # ratchet:bentoml/setup-bentoml-action@v1
187
bentoml-version: 'main'
188
python-version-file: .python-version-default
189
- name: Install jq and curl
190
run: sudo apt-get install -y jq curl
191
- name: Import bot's GPG key for signing commits
193
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # ratchet:crazy-max/ghaction-import-gpg@v6
195
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
196
passphrase: ${{ secrets.GPG_PASSPHRASE }}
197
git_config_global: true
198
git_user_signingkey: true
199
git_commit_gpgsign: true
200
git_tag_gpgsign: true
201
- name: Update current formula
203
GIT_AUTHOR_NAME: ${{ steps.import-gpg-key.outputs.name }}
204
GIT_AUTHOR_EMAIL: ${{ steps.import-gpg-key.outputs.email }}
205
GIT_COMMITTER_NAME: ${{ steps.import-gpg-key.outputs.name }}
206
GIT_COMMITTER_EMAIL: ${{ steps.import-gpg-key.outputs.email }}
207
GITHUB_TOKEN: ${{ secrets.HOMEBREW_GITHUB_TOKEN }}
209
git pull --autostash --no-edit --gpg-sign --ff origin main
210
SEMVER="${{ needs.release.outputs.version }}"
212
pip install fs jinja2 ghapi plumbum
213
./tools/update-brew-tap.py
214
git add Formula && git commit -S -sm "infra: bump to homebrew tap release to ${SEMVER} [generated] [skip ci]"
215
git push origin HEAD:main