Release Droid - Upload GitHub Release Assets #16
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: Release Droid - Upload GitHub Release Assets | |
on: | |
workflow_dispatch: | |
inputs: | |
upload_url: | |
description: 'Upload URL' | |
required: true | |
jobs: | |
release: | |
strategy: | |
matrix: | |
python-version: [ "3.10" ] | |
runs-on: ubuntu-latest | |
env: | |
RELEASE_DIR: ".build_output/exported_container" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python & Poetry Environment | |
uses: ./.github/actions/prepare_poetry_env | |
- name: Build Poetry | |
run: poetry build | |
- name: Install project whl | |
run: pip install dist/*.whl | |
- name: Release language container | |
run: poetry run python3 -u "./exasol_sagemaker_extension/deployment/language_container.py" "$RELEASE_DIR" | |
- name: Upload assets to the GitHub release draft | |
uses: shogo82148/actions-upload-release-asset@v1 | |
with: | |
upload_url: ${{ github.event.inputs.upload_url }} | |
asset_path: dist/* | |
# Since the container was built in the pytest run above, no need to rebuilt before the upload. | |
- name: Upload script-language container | |
uses: shogo82148/actions-upload-release-asset@v1 | |
with: | |
upload_url: ${{ github.event.inputs.upload_url }} | |
asset_path: ${{ env.RELEASE_DIR }}/* | |
- name: PyPi Release | |
env: | |
POETRY_HTTP_BASIC_PYPI_USERNAME: "__token__" | |
POETRY_HTTP_BASIC_PYPI_PASSWORD: "${{ secrets.PYPI_TOKEN }}" | |
run: poetry publish |