-
Notifications
You must be signed in to change notification settings - Fork 101
67 lines (60 loc) · 1.88 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: "Publish"
on:
workflow_dispatch:
inputs:
deploy-to:
description: "Choose whether to deploy to test or prod"
type: environment
default: "prod"
branch:
description: "Choose the branch to release from"
type: string
default: "main"
pypi-internal:
description: "Publish Internally"
type: boolean
default: true
pypi-public:
description: "Publish to PyPI"
type: boolean
default: false
# don't attempt to release the same target in parallel
concurrency:
group: ${{ github.workflow }}-${{ inputs.deploy-to }}
cancel-in-progress: true
jobs:
unit-tests:
uses: ./.github/workflows/unit-tests.yml
with:
branch: ${{ inputs.branch }}
integration-tests:
uses: ./.github/workflows/integration-tests.yml
with:
branch: ${{ inputs.branch }}
repository: ${{ github.repository }}
secrets: inherit
publish-internal:
if: ${{ inputs.pypi-internal == true }}
needs: [unit-tests, integration-tests]
uses: ./.github/workflows/publish-internal.yml
with:
deploy-to: ${{ inputs.deploy-to }}
branch: ${{ inputs.branch }}
secrets: inherit
publish-pypi:
if: ${{ inputs.pypi-public == true }}
needs: [unit-tests, integration-tests]
uses: ./.github/workflows/publish-pypi.yml
with:
deploy-to: ${{ inputs.deploy-to }}
branch: ${{ inputs.branch }}
publish-pypi-dbt-athena-community:
if: ${{ inputs.pypi-public == true }}
# dbt-athena-community is hard pinned to dbt-athena to ensure they are the same
# this means we need to finish publishing dbt-athena before starting to build dbt-athena-community
needs: publish-pypi
uses: ./.github/workflows/publish-pypi.yml
with:
package: "dbt-athena-community"
deploy-to: ${{ inputs.deploy-to }}
branch: ${{ inputs.branch }}