-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pip gh action flow for test and prod
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# .github/workflows/ci-pip.yml | ||
jobs: | ||
pypi-publish: | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
name: Upload release to PyPI | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/<your-pypi-project-name> | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install dependencies | ||
run: pip install --upgrade setuptools wheel twine | ||
|
||
- name: Build the package | ||
run: | | ||
cd jito_searcher_client | ||
python setup.py sdist bdist_wheel | ||
- name: Publish package to TestPyPI | ||
run: twine upload --repository-url https://test.pypi.org/legacy/ dist/* | ||
|
||
- name: Publish package to PyPI | ||
run: twine upload dist/* |