Skip to content

Commit

Permalink
Publish to GitHub packages when RC branch is pushed (#473)
Browse files Browse the repository at this point in the history
Use plain RC branch name as version during build.

See #356
  • Loading branch information
fsteeg authored and dr0i committed Nov 4, 2022
1 parent 893e5b1 commit 524b69e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish package to GitHub Packages
on:
push:
branches:
- 'publish'
- '*-rc*'
jobs:
publish:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,10 @@ def getSnapshotVersion() {
logger.lifecycle('Release branch found')
return "${extractVersionFromBranch(grgit.branch.current().name)}-SNAPSHOT"
}
if (grgit.branch.current().name.contains('-rc')) {
logger.lifecycle('Release candidate branch found')
return "${grgit.branch.current().name}"
}
logger.lifecycle('Feature branch found')
return "feature-${grgit.branch.current().name}-SNAPSHOT"
}
Expand Down

0 comments on commit 524b69e

Please sign in to comment.