mirror of
https://github.com/bentoml/OpenLLM.git
synced 2026-05-19 05:57:39 -04:00
chore(ci): cleanup workflow
make it a pipeline for release now Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
This commit is contained in:
60
.github/workflows/create-releases.yml
vendored
60
.github/workflows/create-releases.yml
vendored
@@ -53,3 +53,63 @@ jobs:
|
||||
git config --global user.name "${{ steps.import-gpg.outputs.name }}"
|
||||
git config --global user.email "${{ steps.import-gpg.outputs.email }}"
|
||||
./.github/actions/release.sh
|
||||
gen-release-notes:
|
||||
if: github.repository_owner == 'bentoml'
|
||||
runs-on: ubuntu-latest
|
||||
needs: [release]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup CI
|
||||
uses: ./.github/actions/setup-repo
|
||||
- name: Create release notes
|
||||
run: ./.github/actions/create_release_and_archive.sh
|
||||
- name: Create release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
# Use GH feature to populate the changelog automatically
|
||||
generate_release_notes: true
|
||||
body_path: release_notes.txt
|
||||
fail_on_unmatched_files: true
|
||||
files: openllm-*.tar.gz
|
||||
bump-dev:
|
||||
if: github.repository_owner == 'bentoml'
|
||||
needs: [gen-release-notes]
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup CI
|
||||
uses: ./.github/actions/setup-repo
|
||||
- name: Import bot's GPG key for signing commits
|
||||
id: import-gpg
|
||||
uses: crazy-max/ghaction-import-gpg@v5
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
||||
git_config_global: true
|
||||
git_user_signingkey: true
|
||||
git_commit_gpgsign: true
|
||||
- name: Install jq and curl
|
||||
run: sudo apt-get install -y jq curl
|
||||
- name: Bump version to dev
|
||||
env:
|
||||
GIT_AUTHOR_NAME: ${{ steps.import-gpg.outputs.name }}
|
||||
GIT_AUTHOR_EMAIL: ${{ steps.import-gpg.outputs.email }}
|
||||
GIT_COMMITTER_NAME: ${{ steps.import-gpg.outputs.name }}
|
||||
GIT_COMMITTER_EMAIL: ${{ steps.import-gpg.outputs.email }}
|
||||
run: |
|
||||
git config --global user.name "${{ steps.import-gpg.outputs.name }}"
|
||||
git config --global user.email "${{ steps.import-gpg.outputs.email }}"
|
||||
git pull --autostash --no-edit --gpg-sign --ff origin main
|
||||
|
||||
echo "Bumping version to dev..." && hatch version patch && hatch version dev
|
||||
|
||||
jq --arg release_version "$(hatch version)" '.version = $release_version' < package.json > package.json.tmp && mv package.json.tmp package.json
|
||||
|
||||
git add src/openllm/__about__.py package.json && git commit -sm "infra: bump to dev version of $(hatch version) [generated]"
|
||||
git push origin HEAD:main
|
||||
|
||||
90
.github/workflows/release-notes.yml
vendored
90
.github/workflows/release-notes.yml
vendored
@@ -1,90 +0,0 @@
|
||||
# Copyright 2023 BentoML Team. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: release-notes
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
workflow_dispatch:
|
||||
env:
|
||||
# This special value tells pypi that the user identity is supplied within the token
|
||||
HATCH_INDEX_USER: __token__
|
||||
# Note, the PYPI_API_TOKEN is for the OpenLLM PyPI user, on
|
||||
# https://github.com/bentoml/openllm/settings/secrets/actions
|
||||
HATCH_INDEX_AUTH: ${{ secrets.PYPI_API_TOKEN }}
|
||||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#defaultsrun
|
||||
defaults:
|
||||
run:
|
||||
shell: bash --noprofile --norc -exo pipefail {0}
|
||||
jobs:
|
||||
gen-release-notes:
|
||||
if: github.repository_owner == 'bentoml'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup CI
|
||||
uses: ./.github/actions/setup-repo
|
||||
- name: Create release notes
|
||||
run: ./.github/actions/create_release_and_archive.sh
|
||||
- name: Create release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
# Use GH feature to populate the changelog automatically
|
||||
generate_release_notes: true
|
||||
body_path: release_notes.txt
|
||||
fail_on_unmatched_files: true
|
||||
files: openllm-*.tar.gz
|
||||
bump-dev:
|
||||
if: github.repository_owner == 'bentoml'
|
||||
needs: [gen-release-notes]
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup CI
|
||||
uses: ./.github/actions/setup-repo
|
||||
- name: Import bot's GPG key for signing commits
|
||||
id: import-gpg
|
||||
uses: crazy-max/ghaction-import-gpg@v5
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
||||
git_config_global: true
|
||||
git_user_signingkey: true
|
||||
git_commit_gpgsign: true
|
||||
- name: Install jq and curl
|
||||
run: sudo apt-get install -y jq curl
|
||||
- name: Bump version to dev
|
||||
env:
|
||||
GIT_AUTHOR_NAME: ${{ steps.import-gpg.outputs.name }}
|
||||
GIT_AUTHOR_EMAIL: ${{ steps.import-gpg.outputs.email }}
|
||||
GIT_COMMITTER_NAME: ${{ steps.import-gpg.outputs.name }}
|
||||
GIT_COMMITTER_EMAIL: ${{ steps.import-gpg.outputs.email }}
|
||||
run: |
|
||||
git config --global user.name "${{ steps.import-gpg.outputs.name }}"
|
||||
git config --global user.email "${{ steps.import-gpg.outputs.email }}"
|
||||
git pull --autostash --no-edit --gpg-sign --ff
|
||||
|
||||
echo "Bumping version to dev..." && hatch version patch && hatch version dev
|
||||
|
||||
jq --arg release_version "$(hatch version)" '.version = $release_version' < package.json > package.json.tmp && mv package.json.tmp package.json
|
||||
|
||||
git add src/openllm/__about__.py package.json && git commit -sm "infra: bump to dev version of $(hatch version) [generated]"
|
||||
git push origin HEAD:main
|
||||
Reference in New Issue
Block a user