Skip to content

Commit 19d23c2

Browse files
authored
Merge pull request #152 from sideeffffect/allow-publish-on-tags
Allow publishing on tags 'v*'
2 parents 0a8b3c8 + 67a5147 commit 19d23c2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
publish:
8080
name: Publish Artifacts
8181
needs: [build]
82-
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/master') && (github.actor != 'mergify[bot]')
82+
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master') && (github.actor != 'mergify[bot]')
8383
strategy:
8484
matrix:
8585
os: [ubuntu-latest]

ci-release.sbt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ ThisBuild / githubWorkflowBuildPreamble += WorkflowStep.Sbt(
1212
name = Some("Check formatting")
1313
)
1414

15-
ThisBuild / githubWorkflowPublishTargetBranches := Seq(RefPredicate.Equals(Ref.Branch("master")))
15+
ThisBuild / githubWorkflowPublishTargetBranches := List(
16+
RefPredicate.StartsWith(Ref.Tag("v")),
17+
RefPredicate.Equals(Ref.Branch("master"))
18+
)
1619
ThisBuild / githubWorkflowPublish := Seq(
1720
WorkflowStep.Sbt(
1821
List("ciReleaseSonatype"),

0 commit comments

Comments
 (0)