File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -44,10 +44,14 @@ jobs:
4444 file : gradle.properties
4545 all : true
4646
47- - name : Publish to Maven
47+ - name : Publish commit to maven
4848 id : upload
4949 run : ./gradlew publish -PmavenType=snapshots -PcommitHash=${{ env.COMMIT_HASH }} -PmavenUsername=${{ secrets.MAVEN_USER }} -PmavenPassword=${{ secrets.MAVEN_TOKEN }}
5050
51+ - name : Publish snapshot to maven
52+ id : upload
53+ run : ./gradlew publish -PmavenType=snapshots -PcommitHash=SNAPSHOT -PmavenUsername=${{ secrets.MAVEN_USER }} -PmavenPassword=${{ secrets.MAVEN_TOKEN }}
54+
5155 - name : Generate Summary
5256 if : steps.upload.conclusion == 'success'
5357 run : |
Original file line number Diff line number Diff line change @@ -238,7 +238,7 @@ publishing {
238238 val mavenUrl = if (project.findProperty(" mavenType" ) == " releases" ) " https://maven.lambda-client.org/releases" else " https://maven.lambda-client.org/snapshots"
239239
240240 val isSnapshots = publishType == " snapshots"
241- val isValidCommit = commitHash.matches(Regex (" [A-Fa-f0-9]+" ))
241+ val isValidCommit = commitHash.matches(Regex (" [A-Fa-f0-9]+" )) || commitHash == " SNAPSHOT "
242242
243243 if (! isSnapshots && isValidCommit)
244244 println (" WARNING: Commit hash for snapshot releases was supplied but the publish type is 'releases'. The commit will be omitted." )
You can’t perform that action at this time.
0 commit comments