Skip to content

Merge pull request #66 from GanjelaMJ98/MG-4136 #11

Merge pull request #66 from GanjelaMJ98/MG-4136

Merge pull request #66 from GanjelaMJ98/MG-4136 #11

name: Publish data-detective-airflow
on:
push:
tags:
- "data-detective-airflow/*.*.*"
jobs:
publish:
strategy:
fail-fast: false
matrix:
python-version: [ 3.9 ]
poetry-version: [ 1.1.13 ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/actions-poetry@v2.1.4
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Configure poetry
run: |-
cd data-detective-airflow
poetry config virtualenvs.in-project true
- name: Set up cache
uses: actions/cache@v2
id: cache
with:
path: data-detective-airflow/.venv
key: data-detective-airflow-${{ runner.os }}-${{ hashFiles('**/data-detective-airflow/poetry.lock') }}
- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
run: poetry run pip --version >/dev/null 2>&1 || rm -rf data-detective-airflow/.venv
- name: Install Dependencies and Publish
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |-
cd data-detective-airflow
poetry config pypi-token.pypi ${PYPI_TOKEN}
poetry install --no-dev
poetry build
poetry publish