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 : PyMongo
20
22
# Changes per branch
21
23
SILK_ASSET_GROUP : mongodb-python-driver
22
24
EVERGREEN_PROJECT : mongo-python-driver
25
+ # Constant
26
+ DRY_RUN : ${{ 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]
78
84
with :
79
85
name : all-dist-${{ github.run_id }}
80
86
path : dist/
87
+ - name : Publish package distributions to TestPyPI
88
+ uses : pypa/gh-action-pypi-publish@release/v1
89
+ with :
90
+ repository-url : https://test.pypi.org/legacy/
91
+ skip-existing : true
81
92
- name : Publish package distributions to PyPI
82
- if : startsWith(inputs.dry_run , 'false')
93
+ if : startsWith(env.DRY_RUN , 'false')
83
94
uses : pypa/gh-action-pypi-publish@release/v1
84
95
85
96
post-publish :
@@ -104,10 +115,10 @@ jobs:
104
115
artifactory_username : ${{ vars.ARTIFACTORY_USERNAME }}
105
116
- uses : mongodb-labs/drivers-github-tools/python/post-publish@v2
106
117
with :
107
- version : ${{ inputs.version }}
108
- following_version : ${{ inputs.following_version }}
118
+ version : ${{ env.VERSION }}
119
+ following_version : ${{ env.FOLLOWING_VERSION }}
109
120
product_name : ${{ env.PRODUCT_NAME }}
110
121
silk_asset_group : ${{ env.SILK_ASSET_GROUP }}
111
122
evergreen_project : ${{ env.EVERGREEN_PROJECT }}
112
123
token : ${{ github.token }}
113
- dry_run : ${{ inputs.dry_run }}
124
+ dry_run : ${{ env.DRY_RUN }}
0 commit comments