From ec2702addb5a14aa2a24298c7d89563325f9e234 Mon Sep 17 00:00:00 2001 From: Aman Kishore Date: Sat, 21 Oct 2023 19:55:04 -0700 Subject: [PATCH 1/4] Fix spelling --- mirageml_version/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mirageml_version/__init__.py b/mirageml_version/__init__.py index 1714244..f06e3ce 100644 --- a/mirageml_version/__init__.py +++ b/mirageml_version/__init__.py @@ -1,5 +1,5 @@ # Copyright Mirage ML Inc 2023 -"""Specifies the `mimrageml.__version__` number for the client package.""" +"""Specifies the `mirageml.__version__` number for the client package.""" from ._version_generated import build_number From 9301953c6eddefe7de03cc3f825d1bb7b5ba1a83 Mon Sep 17 00:00:00 2001 From: Aman Kishore Date: Sat, 21 Oct 2023 20:10:52 -0700 Subject: [PATCH 2/4] Publish to pypi --- .github/workflows/python-publish.yml | 32 ++++------------------------ 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 77e567c..9787ad0 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -10,34 +10,13 @@ name: Upload Python Package to PyPI on: push - jobs: - update-version: - name: Update version - if: github.actor != 'modal-pr-review-automation[bot]' && github.ref == 'refs/heads/main' - runs-on: ubuntu-latest - - - - uses: actions/checkout@v3 - with: - token: ${{ steps.generate_token.outputs.token }} - - deploy: - + name: Deploy runs-on: ubuntu-latest steps: - - name: Generate token for Github PR Bot - id: generate_token - uses: tibdex/github-app-token@v1 - with: - app_id: ${{ secrets.GH_PRBOT_APP_ID }} - private_key: ${{ secrets.GH_PRBOT_APP_PRIVATE_KEY }} - - uses: actions/checkout@v3 - with: - token: ${{ steps.generate_token.outputs.token }} - name: Set up Python uses: ./.github/actions/setup-cached-python @@ -45,14 +24,11 @@ jobs: version: "3.9" - name: Bump the version number - run: inv update-build-number $GITHUB_RUN_NUMBER + run: inv update-build-number - - uses: EndBug/add-and-commit@v9 + - uses: stefanzweifel/git-auto-commit-action@v5 with: - add: modal_version/_version_generated.py - message: "[auto-commit] [skip ci] Bump the build number" - pull: "--rebase --autostash" - default_author: github_actions + commit_message: Bump the build number - name: Install dependencies run: | From c2114ddaf09f6ad47797888daf22d66315a8c71c Mon Sep 17 00:00:00 2001 From: AmanKishore Date: Sun, 22 Oct 2023 03:11:44 +0000 Subject: [PATCH 3/4] Bump the build number --- mirageml_version/_version_generated.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mirageml_version/_version_generated.py b/mirageml_version/_version_generated.py index d8e7d6b..ee5b853 100644 --- a/mirageml_version/_version_generated.py +++ b/mirageml_version/_version_generated.py @@ -1,2 +1,2 @@ # Copyright Mirage ML 2023 -build_number = 1 +build_number = 2 From 5bdd422c4d8f9b577db3860328d30741f3dff9a5 Mon Sep 17 00:00:00 2001 From: Aman Kishore Date: Sat, 21 Oct 2023 20:18:59 -0700 Subject: [PATCH 4/4] Only deploy on releases --- .github/workflows/python-publish.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 9787ad0..23f91e9 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -8,7 +8,9 @@ name: Upload Python Package to PyPI -on: push +on: + release: + types: [created] jobs: deploy: