Skip to content

chore(pre-commit): Use ruff for formatting instead of black #35

chore(pre-commit): Use ruff for formatting instead of black

chore(pre-commit): Use ruff for formatting instead of black #35

Workflow file for this run

name: Tagged release
on:
push:
tags:
- "v*"
jobs:
gh_tagged_release:
runs-on: ubuntu-latest
steps:
- name: Wait for CI
uses: fountainhead/action-wait-for-check@v1.2.0
id: wait-for-ci
with:
token: ${{ secrets.GH_DEPLOY_TOKEN }}
checkName: CI
ref: ${{ github.sha }}
# Wait for one hour
timeoutSeconds: 3600
intervalSeconds: 60
- name: Fail if CI failed
if: steps.wait-for-ci.outputs.conclusion != 'success'
run: |
echo "CI failed or didn't complete in time"
exit 1
- name: Checkout
uses: actions/checkout@v2.3.4
- name: Set up Python 3.10
uses: actions/setup-python@v5.4.0
with:
python-version: '3.10'
- name: Install Poetry
uses: abatilo/actions-poetry@v2.4.0
with:
poetry-version: 2.0.1
- name: Install airflow-dbt-python with Poetry
run: poetry install
- name: Build airflow-dbt-python with Poetry
run: poetry build
- name: Set prerelease variable
run: echo "IS_PRERELEASE=$(if $(poetry version -s | grep -qP '^[0-9]+\.[0-9]+\.[0-9]+$'); then echo 'false'; else echo 'true'; fi)" >> $GITHUB_ENV
- name: Set release git tag
run: echo "RELEASE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV
- name: Check tag matches package version
run: if [[ "$(poetry version -s)" == ${RELEASE_TAG/v/} ]]; then exit 0; else exit 1; fi
- name: Release new tag
uses: softprops/action-gh-release@v1
with:
prerelease: ${{ fromJSON(env.IS_PRERELEASE) }}
token: ${{ secrets.GH_DEPLOY_TOKEN }}
files: |
dist/*