Skip to content

Commit 375aa50

Browse files
committed
Build faster when starting development of the next version
Closes gh-40813
1 parent 7f5329f commit 375aa50

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/actions/build/action.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ inputs:
1919
outputs:
2020
build-scan-url:
2121
description: 'The URL, if any, of the build scan produced by the build'
22-
value: ${{ (inputs.publish == 'true' && steps.build-and-publish.outputs.build-scan-url) || steps.build.outputs.build-scan-url }}
22+
value: ${{ (inputs.publish == 'true' && steps.publish.outputs.build-scan-url) || steps.build.outputs.build-scan-url }}
2323
version:
2424
description: 'The version that was built'
2525
value: ${{ steps.read-version.outputs.version }}
@@ -38,13 +38,13 @@ runs:
3838
env:
3939
DEVELOCITY_ACCESS_KEY: ${{ inputs.develocity-access-key }}
4040
run: ./gradlew build
41-
- name: Build and Publish
42-
id: build-and-publish
41+
- name: Publish
42+
id: publish
4343
if: ${{ inputs.publish == 'true' }}
4444
shell: bash
4545
env:
4646
DEVELOCITY_ACCESS_KEY: ${{ inputs.develocity-access-key }}
47-
run: ./gradlew -PdeploymentRepository=$(pwd)/deployment-repository build publishAllPublicationsToDeploymentRepository
47+
run: ./gradlew -PdeploymentRepository=$(pwd)/deployment-repository ${{ !startsWith(github.event.head_commit.message, 'Next development version') && 'build' || '' }} publishAllPublicationsToDeploymentRepository
4848
- name: Read Version From gradle.properties
4949
id: read-version
5050
shell: bash

0 commit comments

Comments
 (0)