Skip to content

Commit e27120a

Browse files
authored
Merge pull request #602 from http4s/fix-publishing-from-ci
Set `githubWorkflowPublishTargetBranches` only once in the build.sbt
2 parents 0b14a51 + 00e2968 commit e27120a

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

Diff for: .github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
publish:
6363
name: Publish Artifacts
6464
needs: [build]
65-
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main')
65+
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
6666
strategy:
6767
matrix:
6868
os: [ubuntu-latest]

Diff for: build.sbt

+1-4
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,8 @@ ThisBuild / githubWorkflowTargetTags ++= Seq("v*")
7676

7777
// currently only publishing tags
7878
ThisBuild / githubWorkflowPublishTargetBranches :=
79-
Seq(RefPredicate.StartsWith(Ref.Tag("v")))
79+
Seq(RefPredicate.StartsWith(Ref.Tag("v")), RefPredicate.Equals(Ref.Branch("main")))
8080

81-
ThisBuild / githubWorkflowPublishTargetBranches := Seq(
82-
RefPredicate.Equals(Ref.Branch("main"))
83-
)
8481
ThisBuild / githubWorkflowBuild := Seq(
8582
WorkflowStep.Sbt(List("validate-ci"))
8683
)

0 commit comments

Comments
 (0)