remove deprecated #173
Workflow file for this run
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
name: Build Python | |
on: | |
push: | |
release: | |
types: [published] | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- name: Build | |
run: bash build-python.sh | |
- name: Upload Python artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: build-python | |
path: build/python/openagents_grpc_proto | |
- name: Upload Python dist | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dist-python | |
path: build/python/dist | |
- name: Publish Python package | |
if: github.event_name == 'release' | |
run: | | |
python -m pip install --upgrade pip | |
pip install twine | |
twine upload build/python/dist/* | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
- name: Prepare asset for upload | |
run: | | |
mv build/python/dist/*.tar.gz build/python/openagents_grpc_proto-PYTHON.tar.gz | |
- name: Upload release asset | |
if: github.event_name == 'release' | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: build/python/openagents_grpc_proto-PYTHON.tar.gz |