diff --git a/.github/workflows/publish_enterprise.yml b/.github/workflows/publish_enterprise.yml index 050c66f4193..a23eda8819d 100644 --- a/.github/workflows/publish_enterprise.yml +++ b/.github/workflows/publish_enterprise.yml @@ -13,6 +13,8 @@ on: - minor - major +jobs: + publish: runs-on: ubuntu-latest if: github.repository == 'BerriAI/litellm' permissions: @@ -47,9 +49,22 @@ on: sed -i "s/litellm-enterprise = {version = \"${OLD}\"/litellm-enterprise = {version = \"${NEW}\"/" ../pyproject.toml sed -i "s/litellm-enterprise==${OLD}/litellm-enterprise==${NEW}/" ../requirements.txt + - name: Update poetry.lock + working-directory: . + run: poetry lock + - name: Build run: poetry build + - name: Commit version bump + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + cd .. + git add enterprise/pyproject.toml pyproject.toml requirements.txt poetry.lock + git commit -m "bump: litellm-enterprise ${{ steps.bump.outputs.old }} → ${{ steps.bump.outputs.new }}" + git push + - name: Publish to PyPI env: TWINE_USERNAME: __token__ @@ -57,13 +72,3 @@ on: run: | pip install twine twine upload dist/litellm_enterprise-${{ steps.bump.outputs.new }}* - - - name: Commit version bump - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - cd .. - poetry lock --no-update - git add enterprise/pyproject.toml pyproject.toml requirements.txt poetry.lock - git commit -m "bump: litellm-enterprise ${{ steps.bump.outputs.old }} → ${{ steps.bump.outputs.new }}" - git push diff --git a/.github/workflows/publish_proxy_extras.yml b/.github/workflows/publish_proxy_extras.yml index 51d1c9dc16c..fa30b153163 100644 --- a/.github/workflows/publish_proxy_extras.yml +++ b/.github/workflows/publish_proxy_extras.yml @@ -16,6 +16,9 @@ on: jobs: publish: runs-on: ubuntu-latest + if: github.repository == 'BerriAI/litellm' + permissions: + contents: write defaults: run: working-directory: litellm-proxy-extras @@ -46,9 +49,22 @@ jobs: sed -i "s/litellm-proxy-extras = {version = \"${OLD}\"/litellm-proxy-extras = {version = \"${NEW}\"/" ../pyproject.toml sed -i "s/litellm-proxy-extras==${OLD}/litellm-proxy-extras==${NEW}/" ../requirements.txt + - name: Update poetry.lock + working-directory: . + run: poetry lock + - name: Build run: poetry build + - name: Commit version bump + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + cd .. + git add litellm-proxy-extras/pyproject.toml pyproject.toml requirements.txt poetry.lock + git commit -m "bump: litellm-proxy-extras ${{ steps.bump.outputs.old }} → ${{ steps.bump.outputs.new }}" + git push + - name: Publish to PyPI env: TWINE_USERNAME: __token__ @@ -56,12 +72,3 @@ jobs: run: | pip install twine twine upload dist/litellm_proxy_extras-${{ steps.bump.outputs.new }}* - - - name: Commit version bump - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - cd .. - git add litellm-proxy-extras/pyproject.toml pyproject.toml requirements.txt - git commit -m "bump: litellm-proxy-extras ${{ steps.bump.outputs.old }} → ${{ steps.bump.outputs.new }}" - git push