Skip to content

Commit 6bfc685

Browse files
committed
This oughtta work
1 parent 996bf00 commit 6bfc685

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

.github/workflows/ci.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,12 @@ jobs:
111111
tar xf targets.tar
112112
rm targets.tar
113113
114-
- run: sbt ++${{ matrix.scala }} nativeImage
114+
- run: sbt ++${{ matrix.scala }} ci-release
115115

116-
- uses: softprops/action-gh-release@v1
116+
- if: startsWith(github.ref, 'refs/tags/')
117+
run: sbt ++${{ matrix.scala }} nativeImage
118+
119+
- if: startsWith(github.ref, 'refs/tags/')
120+
uses: softprops/action-gh-release@v1
117121
with:
118122
files: target/native-image/spotify-next

build.sbt

+9-2
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,17 @@ ThisBuild / githubWorkflowPublishTargetBranches := List(RefPredicate.StartsWith(
2525
ThisBuild / githubWorkflowOSes := Seq("macos-10.15")
2626

2727
ThisBuild / githubWorkflowPublish := Seq(
28-
WorkflowStep.Sbt(List("nativeImage")),
28+
WorkflowStep.Sbt(
29+
List("ci-release")
30+
),
31+
WorkflowStep.Sbt(
32+
List("nativeImage"),
33+
cond = Some("startsWith(github.ref, 'refs/tags/')")
34+
),
2935
WorkflowStep.Use(
3036
UseRef.Public("softprops", "action-gh-release", "v1"),
31-
params = Map("files" -> "target/native-image/spotify-next")
37+
params = Map("files" -> "target/native-image/spotify-next"),
38+
cond = Some("startsWith(github.ref, 'refs/tags/')")
3239
)
3340
)
3441
ThisBuild / githubWorkflowGeneratedCI ~= {

0 commit comments

Comments
 (0)