13
13
description : " Dry Run?"
14
14
default : false
15
15
type : boolean
16
+ schedule :
17
+ - cron : ' 30 5 * * *'
16
18
17
19
env :
18
20
# Changes per repo
19
21
PRODUCT_NAME : Motor
20
22
# Changes per branch
21
23
SILK_ASSET_GROUP : motor
22
24
EVERGREEN_PROJECT : motor
25
+ # Constant
26
+ DRY_RUN : ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run || 'true' }}
27
+ FOLLOWING_VERSION : ${{ inputs.following_version || '' }}
28
+ VERSION : ${{ inputs.version || '10.10.10.10' }}
23
29
24
30
defaults :
25
31
run :
48
54
- uses : mongodb-labs/drivers-github-tools/python/pre-publish@v2
49
55
id : pre-publish
50
56
with :
51
- version : ${{ inputs.version }}
52
- dry_run : ${{ inputs.dry_run }}
57
+ version : ${{ env.VERSION }}
58
+ dry_run : ${{ env.DRY_RUN }}
53
59
54
60
build-dist :
55
61
needs : [pre-publish]
76
82
with :
77
83
name : all-dist-${{ github.run_id }}
78
84
path : dist/
85
+ - name : Publish package distributions to TestPyPI
86
+ uses : pypa/gh-action-pypi-publish@release/v1
87
+ with :
88
+ repository-url : https://test.pypi.org/legacy/
89
+ skip-existing : true
90
+ attestations : ${{ env.DRY_RUN }}
79
91
- name : Publish package distributions to PyPI
80
- if : startsWith(inputs.dry_run , 'false')
92
+ if : startsWith(env.DRY_RUN , 'false')
81
93
uses : pypa/gh-action-pypi-publish@release/v1
82
94
83
95
post-publish :
@@ -102,10 +114,10 @@ jobs:
102
114
artifactory_username : ${{ vars.ARTIFACTORY_USERNAME }}
103
115
- uses : mongodb-labs/drivers-github-tools/python/post-publish@v2
104
116
with :
105
- version : ${{ inputs.version }}
106
- following_version : ${{ inputs.following_version }}
117
+ version : ${{ env.VERSION }}
118
+ following_version : ${{ env.FOLLOWING_VERSION }}
107
119
product_name : ${{ env.PRODUCT_NAME }}
108
120
silk_asset_group : ${{ env.SILK_ASSET_GROUP }}
109
121
evergreen_project : ${{ env.EVERGREEN_PROJECT }}
110
122
token : ${{ github.token }}
111
- dry_run : ${{ inputs.dry_run }}
123
+ dry_run : ${{ env.DRY_RUN }}
0 commit comments