Skip to content

Commit d925f93

Browse files
authored
Merge pull request #102 from aslesarenko/master
Fix publising
2 parents 59c4fbd + 0a7383a commit d925f93

File tree

3 files changed

+30
-5
lines changed

3 files changed

+30
-5
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v2
1616

17+
- name: Setup NPM
18+
uses: pnpm/action-setup@v2
19+
with:
20+
version: 7.21.0
21+
node-version: ${{ matrix.node-version }}
22+
cache: "pnpm"
23+
- run: pnpm install
24+
1725
- name: Setup Java and Scala
1826
uses: olafurpg/setup-scala@v10
1927
with:
@@ -37,7 +45,7 @@ jobs:
3745
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
3846

3947
- name: Publish release ${{ github.ref }}
40-
run: sbt +publishSigned sonatypeBundleRelease
48+
run: sbt +scryptoJVM/publishSigned +scryptoJS/publishSigned sonatypeBundleRelease
4149
env:
4250
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
4351
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}

build.sbt

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import sbt.Keys.{homepage, scalaVersion}
22

33
name := "scrypto"
44
description := "Cryptographic primitives for Scala"
5+
organization := "org.scorexfoundation"
56

67
lazy val scala213 = "2.13.8"
78
lazy val scala212 = "2.12.15"
@@ -33,13 +34,14 @@ lazy val commonSettings = Seq(
3334
),
3435
libraryDependencies ++= Seq(
3536
"org.rudogma" %%% "supertagged" % "2.0-RC2",
36-
"org.scorexfoundation" %%% "scorex-util" % "0.1.8-20-565873cd-SNAPSHOT",
37+
"org.scorexfoundation" %%% "scorex-util" % "0.2.0",
3738
"org.scalatest" %%% "scalatest" % "3.3.0-SNAP3" % Test,
3839
"org.scalatest" %%% "scalatest-propspec" % "3.3.0-SNAP3" % Test,
3940
"org.scalatest" %%% "scalatest-shouldmatchers" % "3.3.0-SNAP3" % Test,
4041
"org.scalatestplus" %%% "scalacheck-1-15" % "3.3.0.0-SNAP3" % Test,
4142
"org.scalacheck" %%% "scalacheck" % "1.15.2" % Test
4243
),
44+
javacOptions ++= javacReleaseOption,
4345
publishMavenStyle := true,
4446
publishTo := sonatypePublishToBundle.value
4547
)
@@ -50,9 +52,15 @@ Test / publishArtifact := false
5052

5153
pomIncludeRepository := { _ => false }
5254

55+
lazy val noPublishSettings = Seq(
56+
publish := {},
57+
publishLocal := {},
58+
publishArtifact := false
59+
)
60+
5361
lazy val scrypto = crossProject(JVMPlatform, JSPlatform)
5462
.in(file("."))
55-
.settings(commonSettings: _*)
63+
.settings(commonSettings)
5664
.jvmSettings(
5765
libraryDependencies ++= Seq(
5866
"org.bouncycastle" % "bcprov-jdk15to18" % "1.66"
@@ -75,7 +83,7 @@ lazy val scryptoJS = scrypto.js
7583
// how to setup ScalablyTyped https://youtu.be/hWUAVrNj65c?t=1341
7684
externalNpm := { file(s"${baseDirectory.value}/..") },
7785
Compile / npmDependencies ++= Seq(
78-
"@noble/hashes" -> "^1.1.4"
86+
"@noble/hashes" -> "1.1.4"
7987
),
8088
useYarn := true
8189
)
@@ -89,6 +97,15 @@ lazy val benchmarks = project
8997
scalaVersion := scala213,
9098
)
9199
.enablePlugins(JmhPlugin)
100+
.settings(noPublishSettings)
101+
102+
def javacReleaseOption = {
103+
if (System.getProperty("java.version").startsWith("1."))
104+
// java <9 "--release" is not supported
105+
Seq()
106+
else
107+
Seq("--release", "8")
108+
}
92109

93110
credentials ++= (for {
94111
username <- Option(System.getenv().get("SONATYPE_USERNAME"))

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"homepage": "https://github.com/input-output-hk/scrypto/README.md",
1414
"dependencies": {
15-
"@noble/hashes": "^1.1.4"
15+
"@noble/hashes": "1.1.4"
1616
},
1717
"devDependencies": {
1818
"jest": "^29.0.3",

0 commit comments

Comments
 (0)