feat(ci): manual dispatch create a release

Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
This commit is contained in:
Aaron
2023-06-03 23:05:39 -07:00
parent 4990cf40c2
commit 4e480938dc
2 changed files with 36 additions and 5 deletions

34
.github/workflows/create-releases.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
name: release
on:
workflow_dispatch:
env:
# This special value tells pypi that the user identity is supplied within the token
TWINE_USERNAME: __token__
# Note, the PYPI_API_TOKEN is for the OpenLLM PyPI user, on
# https://github.com/bentoml/openllm/settings/secrets/actions
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
GIT_AUTHOR_NAME: github-actions[bot]
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#defaultsrun
defaults:
run:
shell: bash --noprofile --norc -exo pipefail {0}
jobs:
release:
if: github.repository_owner == 'bentoml'
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: Install jq and curl
run: sudo apt-get install -y jq curl
- name: Create a release
run: |
git config user.name "${{ env.GIT_AUTHOR_NAME }}"
git config user.email "${{ env.GIT_AUTHOR_EMAIL }}"
./tools/release

View File

@@ -1,9 +1,8 @@
name: release
name: release-notes
on:
workflow_dispatch:
push:
tags:
- '*.*.*'
- 'v*.*.*'
env:
# This special value tells pypi that the user identity is supplied within the token
TWINE_USERNAME: __token__
@@ -20,8 +19,6 @@ jobs:
release:
if: github.repository_owner == 'bentoml'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with: