Skip to content

Commit 524b69e

Browse files
fsteegdr0i
authored andcommitted
Publish to GitHub packages when RC branch is pushed (#473)
Use plain RC branch name as version during build. See #356
1 parent 893e5b1 commit 524b69e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Publish package to GitHub Packages
22
on:
33
push:
44
branches:
5-
- 'publish'
5+
- '*-rc*'
66
jobs:
77
publish:
88
runs-on: ubuntu-latest

build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,10 @@ def getSnapshotVersion() {
342342
logger.lifecycle('Release branch found')
343343
return "${extractVersionFromBranch(grgit.branch.current().name)}-SNAPSHOT"
344344
}
345+
if (grgit.branch.current().name.contains('-rc')) {
346+
logger.lifecycle('Release candidate branch found')
347+
return "${grgit.branch.current().name}"
348+
}
345349
logger.lifecycle('Feature branch found')
346350
return "feature-${grgit.branch.current().name}-SNAPSHOT"
347351
}

0 commit comments

Comments
 (0)