diff --git a/.github/workflows/cd-push-dbt-metricflow-to-pypi.yaml b/.github/workflows/cd-push-dbt-metricflow-to-pypi.yaml new file mode 100644 index 0000000000..05618a380c --- /dev/null +++ b/.github/workflows/cd-push-dbt-metricflow-to-pypi.yaml @@ -0,0 +1,27 @@ +name: Publish dbt-metricflow Release +on: + workflow_dispatch: + push: + # Tag format is /v + tags: + - "dbt-metricflow/v[0-9]+.[0-9]+.[0-9]+*" + +env: + PYTHON_VERSION: "3.8" + +jobs: + pypi-publish: + runs-on: ubuntu-latest + environment: Pypi Publish + steps: + - name: Check-out the repo + uses: actions/checkout@v3 + + - name: Setup Python ${{ env.PYTHON_VERSION }} Environment + uses: ./.github/actions/setup-python-env + with: + python-version: "${{ env.PYTHON_VERSION }}" + + - name: Hatch Publish `dbt-metricflow` + working-directory: ./dbt-metricflow + run: hatch build && hatch publish diff --git a/.github/workflows/cd-push-to-pypi.yaml b/.github/workflows/cd-push-metricflow-to-pypi.yaml similarity index 74% rename from .github/workflows/cd-push-to-pypi.yaml rename to .github/workflows/cd-push-metricflow-to-pypi.yaml index 6b32bec67e..962009d81f 100644 --- a/.github/workflows/cd-push-to-pypi.yaml +++ b/.github/workflows/cd-push-metricflow-to-pypi.yaml @@ -2,8 +2,10 @@ name: Publish Metricflow Release on: workflow_dispatch: push: + # MetricFlow historically tagged releases with v + # We restrict to this for now and assume any tag without a package identifier is MetricFlow itself tags: - - "*" + - "v[0-9]+.[0-9]+.[0-9]+*" env: PYTHON_VERSION: "3.8"