mirror of
https://github.com/bentoml/OpenLLM.git
synced 2026-04-22 16:07:24 -04:00
infra: update release scripts to run locally
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
20
.github/actions/release.sh
vendored
20
.github/actions/release.sh
vendored
@@ -18,11 +18,6 @@ validate_release() {
|
||||
fi
|
||||
}
|
||||
|
||||
if ! [ "$GITHUB_ACTIONS" = true ]; then
|
||||
echo "This script should only be run on GitHub Actions. Aborting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if release flag is provided
|
||||
if [[ $1 == "--release" ]]; then
|
||||
# Check if release argument is provided
|
||||
@@ -45,17 +40,6 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
release_package() {
|
||||
local version="$1"
|
||||
echo "Releasing version ${version}..."
|
||||
git add CHANGELOG.md changelog.d
|
||||
git commit -S -sm "infra: prepare for release ${version} [generated] [skip ci]"
|
||||
git push origin main
|
||||
echo "Releasing tag ${version}..." && git tag -a "v${version}" -sm "Release ${version} [generated by GitHub Actions]"
|
||||
git push origin "v${version}"
|
||||
echo "Finish releasing version ${version}"
|
||||
}
|
||||
|
||||
# Get the current version and separate the alpha part if it exists
|
||||
version="$(git describe --tags "$(git rev-list --tags --max-count=1)")"
|
||||
VERSION="${version#v}"
|
||||
@@ -124,4 +108,6 @@ else
|
||||
fi
|
||||
|
||||
echo "Commit count: $(git rev-list --count HEAD)"
|
||||
release_package "${RELEASE_VERSION}"
|
||||
echo "Releasing tag ${RELEASE_VERSION}..." && git tag -a "v${RELEASE_VERSION}" -sm "Release ${RELEASE_VERSION} [generated by GitHub Actions]"
|
||||
git push origin "v${RELEASE_VERSION}"
|
||||
echo "Finish releasing RELEASE_VERSION ${RELEASE_VERSION}"
|
||||
|
||||
4
.github/workflows/create-releases.yml
vendored
4
.github/workflows/create-releases.yml
vendored
@@ -7,9 +7,9 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # ratchet:actions/checkout@v4
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # ratchet:actions/setup-python@v5
|
||||
with:
|
||||
python-version-file: .python-version-default
|
||||
- name: Build
|
||||
|
||||
Reference in New Issue
Block a user