mirror of
https://github.com/bentoml/OpenLLM.git
synced 2026-01-23 15:01:32 -05:00
chore(ci): better release flow (#131)
This commit is contained in:
41
.github/workflows/create-releases.yml
vendored
41
.github/workflows/create-releases.yml
vendored
@@ -91,7 +91,7 @@ jobs:
|
||||
path: dist
|
||||
- name: Publish to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
prepare-for-dev-cycle:
|
||||
release-notes:
|
||||
needs:
|
||||
- release
|
||||
- publish-python
|
||||
@@ -100,3 +100,42 @@ jobs:
|
||||
uses: bentoml/OpenLLM/.github/workflows/release-notes.yml@main
|
||||
with:
|
||||
tags: ${{ needs.release.outputs.version }}
|
||||
prepare-next-dev-cycle:
|
||||
needs:
|
||||
- binary-distribution
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup python
|
||||
uses: actions/setup-python@v4
|
||||
- name: Install dependencies
|
||||
run: pip install hatch towncrier
|
||||
- name: Install jq and curl
|
||||
run: sudo apt-get install -y jq curl
|
||||
- name: Import bot's GPG key for signing commits
|
||||
id: import-gpg-key
|
||||
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
|
||||
git_tag_gpgsign: true
|
||||
- name: Bump version to dev
|
||||
env:
|
||||
GIT_AUTHOR_NAME: ${{ steps.import-gpg-key.outputs.name }}
|
||||
GIT_AUTHOR_EMAIL: ${{ steps.import-gpg-key.outputs.email }}
|
||||
GIT_COMMITTER_NAME: ${{ steps.import-gpg-key.outputs.name }}
|
||||
GIT_COMMITTER_EMAIL: ${{ steps.import-gpg-key.outputs.email }}
|
||||
run: |
|
||||
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 -S -sm "infra: bump to dev version of $(hatch version) [generated] [skip ci]"
|
||||
git push origin HEAD:main
|
||||
|
||||
37
.github/workflows/release-notes.yml
vendored
37
.github/workflows/release-notes.yml
vendored
@@ -75,40 +75,3 @@ jobs:
|
||||
dist/*
|
||||
archives/*
|
||||
installers/*
|
||||
bump-dev:
|
||||
needs: [gen-release-notes]
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup python
|
||||
uses: actions/setup-python@v4
|
||||
- name: Install dependencies
|
||||
run: pip install hatch towncrier
|
||||
- name: Install jq and curl
|
||||
run: sudo apt-get install -y jq curl
|
||||
- name: Import bot's GPG key for signing commits
|
||||
id: import-gpg-key
|
||||
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
|
||||
git_tag_gpgsign: true
|
||||
- name: Bump version to dev
|
||||
env:
|
||||
GIT_AUTHOR_NAME: ${{ steps.import-gpg-key.outputs.name }}
|
||||
GIT_AUTHOR_EMAIL: ${{ steps.import-gpg-key.outputs.email }}
|
||||
GIT_COMMITTER_NAME: ${{ steps.import-gpg-key.outputs.name }}
|
||||
GIT_COMMITTER_EMAIL: ${{ steps.import-gpg-key.outputs.email }}
|
||||
run: |
|
||||
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 -S -sm "infra: bump to dev version of $(hatch version) [generated] [skip ci]"
|
||||
git push origin HEAD:main
|
||||
|
||||
Reference in New Issue
Block a user