diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9a158097..e7d19014 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,6 +1,7 @@ name: "Publish" on: + pull_request: workflow_dispatch: inputs: package: @@ -12,19 +13,19 @@ on: deploy-to: description: "Choose whether to publish to test or prod" type: environment - default: "prod" + default: "test" branch: description: "Choose the branch to publish from" type: string - default: "main" + default: "monorepo/shared-workflows" pypi-internal: description: "Publish Internally" type: boolean - default: true + default: false pypi-public: description: "Publish to PyPI" type: boolean - default: false + default: true # don't attempt to release the same target in parallel concurrency: diff --git a/pyproject.toml b/pyproject.toml index 3c62898d..94d0060b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,6 +64,7 @@ dependencies = [ setup = "pre-commit install" code-quality = "pre-commit run --all-files" unit-tests = "python -m pytest {args:tests/unit}" +test-publish = "gh workflow run publish.yml --ref $(git rev-parse --abbrev-ref HEAD) -f package=dbt-adapters -f branch=$(git rev-parse --abbrev-ref HEAD) -f deploy-to=test -f pypi-internal=false -f pypi-public=true" [tool.hatch.envs.build] detached = true