1- name : Release
1+ name : Publish Release
22
33on :
4- workflow_dispatch :
5- inputs :
6- version :
7- description : ' Version of this deployment'
8- required : true
4+ release :
5+ types : [published]
96
107env :
118 PYTHON_VERSION : " 3.11"
2623 - name : Install Poetry
2724 uses : snok/install-poetry@v1
2825 with :
29- version : 1.8.3
30-
31- - name : Set Version
32- run : poetry version ${{ github.event.inputs.version }}
26+ version : ${{ env.POETRY_VERSION }}
3327
3428 - name : Build package
3529 run : poetry build
4034 name : dist
4135 path : dist/
4236
43- # test-pypi-publish:
44- # needs: build
45- # runs-on: ubuntu-latest
46-
47- # steps:
48- # - uses: actions/checkout@v4
49-
50- # - name: Set up Python
51- # uses: actions/setup-python@v4
52- # with:
53- # python-version: ${{ env.PYTHON_VERSION }}
54-
55- # - name: Install Poetry
56- # uses: snok/install-poetry@v1
57-
58- # - uses: actions/download-artifact@v4
59- # with:
60- # name: dist
61- # path: dist/
62-
63- # - name: Publish to TestPyPI
64- # env:
65- # POETRY_PYPI_TOKEN_TESTPYPI: ${{ secrets.TESTPYPI }}
66- # run: poetry config repositories.test-pypi https://test.pypi.org/legacy/; poetry config pypi-token.test-pypi $POETRY_PYPI_TOKEN_TESTPYPI; poetry publish --repository test-pypi
67-
68- # pre-release-checks:
69- # needs: test-pypi-publish
70- # runs-on: ubuntu-latest
71-
72- # steps:
73- # - uses: actions/checkout@v4
74-
75- # - name: Set up Python
76- # uses: actions/setup-python@v4
77- # with:
78- # python-version: ${{ env.PYTHON_VERSION }}
79-
80- # - name: Install Poetry
81- # uses: snok/install-poetry@v1
82-
83- # - name: Install dependencies
84- # run: |
85- # poetry install --all-extras
86-
87- # - name: Install published package from TestPyPI
88- # run:
89- # poetry run pip install --index-url https://test.pypi.org/simple/ --no-deps redisvl; SKIP_VECTORIZERS=True SKIP_RERANKERS=True poetry run test-cov
90-
9137 publish :
92- needs : build # pre-release-checks
38+ needs : build
9339 runs-on : ubuntu-latest
9440
9541 steps :
10248
10349 - name : Install Poetry
10450 uses : snok/install-poetry@v1
51+ with :
52+ version : ${{ env.POETRY_VERSION }}
10553
10654 - uses : actions/download-artifact@v4
10755 with :
@@ -111,26 +59,4 @@ jobs:
11159 - name : Publish to PyPI
11260 env :
11361 POETRY_PYPI_TOKEN_PYPI : ${{ secrets.PYPI }}
114- run : poetry publish
115-
116- create-release :
117- needs : publish
118- runs-on : ubuntu-latest
119-
120- steps :
121- - uses : actions/checkout@v4
122-
123- - uses : actions/download-artifact@v4
124- with :
125- name : dist
126- path : dist/
127-
128- - name : Create Release
129- uses : ncipollo/release-action@v1
130- with :
131- artifacts : " dist/*"
132- token : ${{ secrets.GITHUB_TOKEN }}
133- draft : false
134- generateReleaseNotes : true
135- tag : ${{ github.event.inputs.version }}
136- commit : main
62+ run : poetry publish
0 commit comments