forked from cohere-ai/cohere-python
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (30 loc) · 799 Bytes
/
Copy pathpython-release.yaml
File metadata and controls
36 lines (30 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Release Python Package
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "pyproject.toml"
jobs:
upload_package:
name: Upload package to PyPi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v4
- name: Install dependencies
env:
PYTHON_KEYRING_BACKEND: keyring.backends.null.Keyring
run: |
pip install twine poetry==1.2.2
poetry install
- name: Create source distribution
run: poetry build
- name: Upload to PyPi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_COHERE_API_KEY_RISK_653 }}
run: |
twine upload --repository pypi dist/*