Skip to content

Commit b7317a5

Browse files
committed
fix release package upload
1 parent 583e16d commit b7317a5

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ jobs:
3838
uses: ncipollo/release-action@v1
3939
with:
4040
tag: ${{ env.LATEST_TAG }}
41-
artifacts: "core/target/universal/*.zip"
41+
artifacts: "target/srp.zip" # same as in `releasePackage` in build.sbt
42+
artifactErrorsFailBuild: true
4243
- name: Deploy to sonatype and release to maven central
4344
shell: bash
4445
run: sbt -v ciReleaseSonatype

build.sbt

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name := "scala-repl-pp-root"
1+
name := "srp-root"
22
ThisBuild/organization := "com.michaelpollmeier"
33
publish/skip := true
44

@@ -8,34 +8,37 @@ lazy val Slf4jVersion = "2.0.16"
88

99
lazy val releasePackage = taskKey[File]("package up a downloadable release")
1010
releasePackage := {
11-
val releaseZip = (core_364/Universal/packageBin).value
12-
streams.value.log.info(s"packaged up a release in $releaseZip")
13-
releaseZip
11+
// same as in `.github/workflows/release.yml`
12+
val releaseFile = target.value / "srp.zip"
13+
IO.copyFile((core_364/Universal/packageBin).value, releaseFile)
14+
streams.value.log.info(s"packaged up a release in $releaseFile")
15+
releaseFile
1416
}
1517

1618
lazy val core_364 = Build
17-
.newProject("core", "3.6.4", "scala-repl-pp")
19+
.newProject("core", "3.6.4", "srp")
1820
.dependsOn(shadedLibs)
1921
.enablePlugins(JavaAppPackaging)
2022
.settings(coreSettings)
2123

2224
lazy val core_352 = Build
23-
.newProject("core", "3.5.2", "scala-repl-pp")
25+
.newProject("core", "3.5.2", "srp")
2426
.dependsOn(shadedLibs)
2527
.enablePlugins(JavaAppPackaging)
2628
.settings(coreSettings)
2729

2830
lazy val coreSettings = commonSettings ++ Seq(
2931
Compile/mainClass := Some("replpp.Main"),
3032
executableScriptName := "srp",
33+
Universal/topLevelDirectory := Some("srp"),
3134
libraryDependencies ++= Seq(
3235
"org.scala-lang" %% "scala3-compiler" % scalaVersion.value,
3336
"org.slf4j" % "slf4j-simple" % Slf4jVersion % Optional,
3437
),
3538
)
3639

3740
lazy val shadedLibs = project.in(file("shaded-libs")).settings(
38-
name := "scala-repl-pp-shaded-libs",
41+
name := "srp-shaded-libs",
3942
scalaVersion := scalaVersions.min,
4043
Compile/compile/scalacOptions ++= Seq(
4144
"-language:implicitConversions",

0 commit comments

Comments
 (0)