From 95266924eb21c7bcbaaf2293cdbde5cc3d28e0a1 Mon Sep 17 00:00:00 2001 From: Steven Hoelscher Date: Thu, 15 Dec 2022 22:31:56 -0800 Subject: [PATCH 1/6] chore: gh release (#2) --- .github/workflows/release.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000000..9e56e58f5062e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: release + +on: + pull_request: + types: + - closed + branches: + - master + paths: + - 'langchain/**.py' + - 'pyproject.toml' + - 'README.md' + +jobs: + if_release: + if: | + ${{ github.event.pull_request.merged == true }} + && ${{ contains(github.event.pull_request.labels.*.name, 'release') }} + runs-on: ubuntu-latest + steps: + - run: | + echo Release! \ No newline at end of file From 9f39619692a7281a2f8c24e6e966bd2da0baa24b Mon Sep 17 00:00:00 2001 From: Steven Hoelscher Date: Thu, 15 Dec 2022 22:35:26 -0800 Subject: [PATCH 2/6] chore: fix newline in README (#3) --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index e802a6299d1a1..099e7bc9d6d14 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,6 @@ For more information on these concepts, please see our [full documentation](http ## 💁 Contributing -As an open source project in a rapidly developing field, we are extremely open -to contributions, whether it be in the form of a new feature, improved infra, or better documentation. +As an open source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infra, or better documentation. For detailed information on how to contribute, see [here](CONTRIBUTING.md). From e51af94c2a13156516a3d0f3d4bad2b88c9e1089 Mon Sep 17 00:00:00 2001 From: Steven Hoelscher Date: Thu, 15 Dec 2022 22:58:36 -0800 Subject: [PATCH 3/6] chore: add release to pypi and GH (#4) * chore: add release to pypi and GH * chore: test version bump --- .github/workflows/release.yml | 32 ++++++++++++++++++++++++++++++-- pyproject.toml | 2 +- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9e56e58f5062e..be579d637e04f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,6 +11,9 @@ on: - 'pyproject.toml' - 'README.md' +env: + POETRY_VERSION: "1.3.1" + jobs: if_release: if: | @@ -18,5 +21,30 @@ jobs: && ${{ contains(github.event.pull_request.labels.*.name, 'release') }} runs-on: ubuntu-latest steps: - - run: | - echo Release! \ No newline at end of file + - uses: actions/checkout@v3 + - name: Install poetry + run: pipx install poetry==$POETRY_VERSION + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: "3.10" + cache: "poetry" + - name: Build project for distribution + run: poetry build + - name: Check Version + id: check-version + run: | + echo version=$(poetry version --short) >> $GITHUB_OUTPUT + - name: Create Release + uses: ncipollo/release-action@v1 + with: + artifacts: "dist/*" + token: ${{ secrets.GITHUB_TOKEN }} + draft: false + generateReleaseNotes: true + tag: v${{ steps.check-version.outputs.version }} + commit: master + - name: Publish to PyPI + env: + POETRY_PYPI_TOKEN_PYPI: ${{ secrets.TEST_PYPI_API_TOKEN }} + run: poetry publish \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 2c59151f5baf7..ab57e8ecdeec5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "langchain" -version = "0.0.38" +version = "0.0.39" description = "Building applications with LLMs through composability" authors = [] license = "MIT" From 1edd74ab4c741524f2e00cfddb684ea27328dd66 Mon Sep 17 00:00:00 2001 From: Steven Hoelscher Date: Thu, 15 Dec 2022 23:05:31 -0800 Subject: [PATCH 4/6] chore: target test pypi (#5) * chore: target test pypi * chore: ensure publilsh targets test pypi --- .github/workflows/release.yml | 4 +++- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index be579d637e04f..32b254ef8d1a3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,4 +47,6 @@ jobs: - name: Publish to PyPI env: POETRY_PYPI_TOKEN_PYPI: ${{ secrets.TEST_PYPI_API_TOKEN }} - run: poetry publish \ No newline at end of file + run: | + poetry config repositories.testpypi https://test.pypi.org/legacy/ + poetry publish -r testpypi \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index ab57e8ecdeec5..c4b2ffb0747a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "langchain" -version = "0.0.39" +version = "0.0.40" description = "Building applications with LLMs through composability" authors = [] license = "MIT" From 22e0283f93551ff3cf591a25b655d5c292777f22 Mon Sep 17 00:00:00 2001 From: shoelsch Date: Thu, 15 Dec 2022 23:23:34 -0800 Subject: [PATCH 5/6] chore: revert version bumps and testing --- .github/workflows/release.yml | 5 ++--- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 32b254ef8d1a3..9e1b5e257186a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,7 +46,6 @@ jobs: commit: master - name: Publish to PyPI env: - POETRY_PYPI_TOKEN_PYPI: ${{ secrets.TEST_PYPI_API_TOKEN }} + POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }} run: | - poetry config repositories.testpypi https://test.pypi.org/legacy/ - poetry publish -r testpypi \ No newline at end of file + poetry publish diff --git a/pyproject.toml b/pyproject.toml index c4b2ffb0747a9..2c59151f5baf7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "langchain" -version = "0.0.40" +version = "0.0.38" description = "Building applications with LLMs through composability" authors = [] license = "MIT" From 648b3a0c6e3fa5156b94b99cea7090960398d3ee Mon Sep 17 00:00:00 2001 From: shoelsch Date: Thu, 15 Dec 2022 23:28:55 -0800 Subject: [PATCH 6/6] chore: only target pyproject.toml changes --- .github/workflows/release.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9e1b5e257186a..1c5853c5cea12 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,9 +7,7 @@ on: branches: - master paths: - - 'langchain/**.py' - 'pyproject.toml' - - 'README.md' env: POETRY_VERSION: "1.3.1"