Skip to content

Commit baa623a

Browse files
authored
Merge pull request #78 from pinecone-io/ch9547
Adding pypi release workflow files
2 parents 99be538 + 250d7eb commit baa623a

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: (alpha) Pypi
2+
# upload package to test Pypi
3+
4+
on:
5+
push:
6+
tags:
7+
- '**-alpha'
8+
9+
env:
10+
TEST_PYPI_URL: https://test.pypi.org/legacy/
11+
TEST_PYPI_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
12+
13+
jobs:
14+
pypi:
15+
timeout-minutes: 30
16+
name: pypi
17+
runs-on: self-hosted
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
- uses: actions/setup-python@v2
22+
with:
23+
python-version: 3.7
24+
25+
- name: Build Python client
26+
run: make package
27+
28+
- name: Upload Python client to Pypi
29+
run: export TWINE_REPOSITORY_URL=${{ env.TEST_PYPI_URL }} && make upload PYPI_PASSWORD=${{ env.TEST_PYPI_PASSWORD }}

.github/workflows/release.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Pypi
2+
# upload package to Pypi
3+
on:
4+
push:
5+
tags:
6+
- '**-release'
7+
8+
env:
9+
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
10+
11+
jobs:
12+
13+
pypi:
14+
timeout-minutes: 30
15+
name: pypi
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- uses: actions/setup-python@v1
21+
with:
22+
python-version: 3.7
23+
24+
- uses: actions/checkout@v2
25+
with:
26+
repository: pinecone-io/pinecone-python-client
27+
ref: ''
28+
token: ${{ secrets.PAT }}
29+
path: pinecone-python-client
30+
31+
- name: Set Python client production environment
32+
run: make set-production
33+
34+
- name: Build Python client
35+
run: make package
36+
37+
- name: Upload Python client to Pypi
38+
run: make upload PYPI_PASSWORD=${{ env.PYPI_PASSWORD }}

0 commit comments

Comments
 (0)