|
|
@@ -0,0 +1,46 @@
|
|
|
+name: Publish Python Package
|
|
|
+
|
|
|
+on:
|
|
|
+ push:
|
|
|
+ tags:
|
|
|
+ - 'v*'
|
|
|
+
|
|
|
+jobs:
|
|
|
+ deploy:
|
|
|
+ runs-on: ubuntu-latest
|
|
|
+ environment: PyPi
|
|
|
+ permissions:
|
|
|
+ id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
|
|
|
+
|
|
|
+ defaults:
|
|
|
+ run:
|
|
|
+ working-directory: ./jito_searcher_client
|
|
|
+
|
|
|
+ steps:
|
|
|
+ - uses: actions/checkout@v3
|
|
|
+
|
|
|
+ - name: Set up Python
|
|
|
+ uses: actions/setup-python@v4
|
|
|
+ with:
|
|
|
+ python-version: '3.x'
|
|
|
+
|
|
|
+ - name: Install Poetry
|
|
|
+ uses: snok/install-poetry@v1
|
|
|
+ with:
|
|
|
+ version: latest
|
|
|
+ virtualenvs-create: true
|
|
|
+ virtualenvs-in-project: true
|
|
|
+
|
|
|
+ - name: Install dependencies
|
|
|
+ run: |
|
|
|
+ poetry install --no-interaction
|
|
|
+
|
|
|
+ - name: Build package
|
|
|
+ run: |
|
|
|
+ poetry build
|
|
|
+
|
|
|
+ - name: Publish package
|
|
|
+ uses: pypa/gh-action-pypi-publish@v1.8.10
|
|
|
+ with:
|
|
|
+ password: ${{ secrets.PYPITOKEN }}
|
|
|
+ packages-dir: jito_searcher_client/dist/
|