Skip to content

Release | PyPi Build Test Package and Push #53

Release | PyPi Build Test Package and Push

Release | PyPi Build Test Package and Push #53

name: Release | PyPi Build Test Package and Push
on:
workflow_dispatch:
inputs:
version:
description: |
"Version to publish (optional):
If not given, next patch from latest will be used."
default: ""
required: false
jobs:
build_push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install Poetry
run: |
echo "[INFO] Installing Poetry..."
curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.8.2 python -
echo "[INFO] Configuring Poetry..."
poetry config virtualenvs.create false # This prevents poetry from creating a virtual environment
- name: Install dependencies using Poetry
run: |
echo "[INFO] Installing dependencies..."
export ENV POETRY_VIRTUALENVS_CREATE=false
export PATH="${PATH}:${HOME}/.poetry/bin"
poetry install --with=dev
- name: bump_test_version
run: |
if [ -z "${{ github.event.inputs.version }}" ]; then
echo "No version input provided, running without RELEASE_VERSION."
make bump-test-version
else
echo "Version input provided: ${{ github.event.inputs.version }}"
make bump-test-version RELEASE_VERSION=${{ github.event.inputs.version }}
fi
shell: bash
- name: clean
run: |
make clean
- name: build
run: |
make build
- name: check
run:
make check
- name: upload
run: |
make push-ci
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}