Merge pull request #66 from GanjelaMJ98/MG-4136 #11
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: 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 |