Skip to content

Release Droid - Upload GitHub Release Assets #14

Release Droid - Upload GitHub Release Assets

Release Droid - Upload GitHub Release Assets #14

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: Install Lua dependencies
run: |
sudo apt-get install luarocks
sudo luarocks install --only-deps *.rockspec
- name: Run Lua unit tests and static code analyzer
run: poetry run poe lua-tests
- name: Release language container
run: ./release_language_container.sh "$RELEASE_DIR"
- name: Setup integration test environment
run: ./scripts/setup_integration_test.sh
- name: Poetry run pytest integration tests
run: poetry run pytest tests
- 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