|
7 | 7 | description: Whether artifacts should be deployed (true|false|central|artifactory).
|
8 | 8 | required: true
|
9 | 9 | type: string
|
| 10 | + default-publish-milestones-central: |
| 11 | + description: Whether the default for milestones & RCs should be deployed to Central |
| 12 | + required: false |
| 13 | + default: false |
| 14 | + type: boolean |
10 | 15 | outputs:
|
11 | 16 | artifacts-deployed:
|
12 | 17 | description: Whether artifacts were actually deployed.
|
@@ -66,12 +71,19 @@ jobs:
|
66 | 71 | env:
|
67 | 72 | SHOULD_DEPLOY_ARTIFACTS: ${{ inputs.should-deploy-artifacts }}
|
68 | 73 | VERSION: ${{ steps.project-version.outputs.version }}
|
| 74 | + DEFAULT_PUBLISH_MILESTONE_CENTRAL: ${{ inputs.default-publish-milestones-central }} |
69 | 75 | run: |
|
70 | 76 | deploy_location="$SHOULD_DEPLOY_ARTIFACTS"
|
71 | 77 | if [[ "$deploy_location" = "true" ]] ; then
|
72 |
| - if [[ "$VERSION" =~ "-" ]] ; then |
73 |
| - # -SNAPSHOT, -M\d+, and -RC\d+ all go to artifactory by default to remain passive |
74 |
| - # Newer generations will only deploy -SNAPSHOT to artifactory, but they must opt into central explicitly |
| 78 | + if [[ "$VERSION" =~ "-SNAPSHOT" ]] ; then |
| 79 | + # always default -SNAPSHOT to artifactory |
| 80 | + deploy_location=artifactory |
| 81 | + elif [[ "$DEFAULT_PUBLISH_MILESTONE_CENTRAL" = "true" ]] ; then |
| 82 | + # if configured, non -SNAPSHOT go to central |
| 83 | + deploy_location=central |
| 84 | + elif [[ "$VERSION" =~ "-" ]] ; then |
| 85 | + # -M\d+, and -RC\d+ all go to artifactory by default to remain passive |
| 86 | + # Newer generations will only deploy -SNAPSHOT to artifactory, but they must specify default-publish-milestone-central=true |
75 | 87 | deploy_location=artifactory
|
76 | 88 | else
|
77 | 89 | deploy_location=central
|
|
0 commit comments