From 346c2fda4f0f7441021668eda52c39b7e03152ca Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Fri, 22 Mar 2024 15:27:45 +0200 Subject: [PATCH 01/15] wip --- .github/workflows/check-pr.yaml | 5 ++--- node/build.sbt | 26 ++++++++++++++++++++------ 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index 46003b84e2..7f64a8806d 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -79,9 +79,8 @@ jobs: echo "ThisBuild / version := \"$sbt_version\"" >> version.sbt echo Setting version to $sbt_version fi - - name: Publish lang - run: sbt ci-release - if: false # steps.filter.outputs.lang == 'true' + - name: Publish lang and node + run: sbt --mem 4096 --batch ";publishSigned;sonatypeBundleRelease" env: PGP_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }} PGP_SECRET: ${{ secrets.OSSRH_GPG_KEY_BASE64 }} diff --git a/node/build.sbt b/node/build.sbt index a7370fa1b1..e7d2a8a2a1 100644 --- a/node/build.sbt +++ b/node/build.sbt @@ -1,5 +1,3 @@ -name := "waves" - enablePlugins( RunApplicationSettings, JavaServerAppPackaging, @@ -20,6 +18,22 @@ javaAgents ++= { } } +publishTo := sonatypePublishToBundle.value +publish / skip := false +homepage := Some(url("https://waves.tech/")) +developers := List( + Developer("ismagin", "Ilya Smagin", "ilya.smagin@gmail.com", url("https://github.com/ismagin")), + Developer("asayadyan", "Artyom Sayadyan", "xrtm000@gmail.com", url("https://github.com/xrtm000")), + Developer("mpotanin", "Mike Potanin", "mpotanin@wavesplatform.com", url("https://github.com/potan")), + Developer("irakitnykh", "Ivan Rakitnykh", "mrkr.reg@gmail.com", url("https://github.com/mrkraft")), + Developer("akiselev", "Alexey Kiselev", "alexey.kiselev@gmail.com>", url("https://github.com/alexeykiselev")), + Developer("phearnot", "Sergey Nazarov", "snazarov@web3tech.ru", url("https://github.com/phearnot")), + Developer("tolsi", "Sergey Tolmachev", "tolsi.ru@gmail.com", url("https://github.com/tolsi")) +) + +Compile / packageDoc / publishArtifact := true +Test / packageDoc / publishArtifact := false + inConfig(Compile)( Seq( PB.targets += scalapb.gen(flatPackage = true) -> sourceManaged.value, @@ -28,12 +42,10 @@ inConfig(Compile)( (** / "waves" / "*.proto").matches(f.toPath) }, PB.deleteTargetDirectory := false, - packageDoc / publishArtifact := false, - packageSrc / publishArtifact := false ) ) -inTask(assembly)(CommonSettings.assemblySettings) +inTask(assembly)(Seq(name := "waves") ++ CommonSettings.assemblySettings) // Adds "$lib_dir/*" to app_classpath in the executable file, this is needed for extensions scriptClasspath += "*" @@ -73,6 +85,8 @@ linuxScriptReplacements += ("network" -> network.value.toString) inConfig(Universal)( Seq( + packageName := s"waves-${version.value}", + mappings += (baseDirectory.value / s"waves-sample.conf" -> "doc/waves.conf.sample"), javaOptions ++= Seq( // -J prefix is required by the bash script @@ -93,7 +107,7 @@ inConfig(Linux)( Seq( packageSummary := "Waves node", packageDescription := "Waves node", - name := s"${name.value}${network.value.packageSuffix}", + name := s"waves${network.value.packageSuffix}", normalizedName := name.value, packageName := normalizedName.value ) From f435ba3b263ce9c78d9ed740727ac25a3b538273 Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Fri, 22 Mar 2024 16:00:51 +0200 Subject: [PATCH 02/15] wip --- .github/workflows/check-pr.yaml | 43 +++++---------------------------- 1 file changed, 6 insertions(+), 37 deletions(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index 7f64a8806d..5e0a365ebc 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -1,10 +1,5 @@ name: Check PR on: - push: - branches: - - version-[0-9].[0-9]+.x - tags: - - v[0-9].[0-9]+.[0-9]+ pull_request: jobs: @@ -35,14 +30,6 @@ jobs: QASE_PROJECT_CODE: PR QASE_API_TOKEN: ${{ secrets.QASE_API_TOKEN }} CHECKPR_RUN_ID: ${{ github.run_id }} - - uses: dorny/paths-filter@v2 - id: filter - with: - filters: | - lang: - - 'lang/**' - - 'build.sbt' - - 'project/*' - name: Compile external sources if: steps.filter.outputs.lang == 'true' run: | @@ -57,32 +44,14 @@ jobs: find swopfi-smart-contracts/dApps -name "*.ride" -type f -exec java -jar lang/jvm/target/file-compiler.jar {} +; - name: Clean cache run: find ~/.cache/coursier -type d -name '*SNAPSHOT' | xargs rm -vrf {} \; - - name: Prepare version - if: false # steps.filter.outputs.lang == 'true' - id: sbt-version - run: | - sbt_version=$(cut -d\" -f2 version.sbt) - git_ref=${GITHUB_REF##*/} - echo ${{ github.event }} - pr_number=${{ github.event.number }} - if [[ $git_ref =~ v[0-9]+\.[0-9]+\.[0-9]+$ ]] ; then - if [[ v$sbt_version != $git_ref ]] ; then - echo SBT version $sbt_version does not match tag $git_ref - exit 1 - fi - else - if [[ $pr_number != "" ]] ; then - sbt_version=$sbt_version-$pr_number-SNAPSHOT - else - sbt_version=$sbt_version-SNAPSHOT - fi - echo "ThisBuild / version := \"$sbt_version\"" >> version.sbt - echo Setting version to $sbt_version - fi - - name: Publish lang and node - run: sbt --mem 4096 --batch ";publishSigned;sonatypeBundleRelease" + - name: Publish snapshots + if: ${{ contains(github.event.pull_request.labels.*.name, 'publish-snapshots') }} env: PGP_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }} PGP_SECRET: ${{ secrets.OSSRH_GPG_KEY_BASE64 }} SONATYPE_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} SONATYPE_USERNAME: ${{ secrets.OSSRH_USERNAME }} + run: | + sbt_version=$(cut -d\" -f2 version.sbt) + pr_number=${{ github.event.number }} + sbt -Dproject.version=$sbt_version-$pr_number-SNAPSHOT --mem 4096 --batch ";publishSigned;sonatypeBundleRelease" From 74b883bb3ae8ef76d5525ce91514f36bc0f69e96 Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Fri, 22 Mar 2024 16:04:24 +0200 Subject: [PATCH 03/15] wip --- .github/workflows/check-pr.yaml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index 5e0a365ebc..288cbf5622 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -7,20 +7,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: - distribution: 'zulu' + distribution: 'temurin' java-version: '11' - - name: Cache SBT - uses: actions/cache@v3 - with: - path: ~/.sbt - key: sbt-cache-${{ hashFiles('project/build.properties') }} - - name: Cache Coursier - uses: actions/cache@v3 - with: - path: ~/.cache/coursier - key: coursier-cache + cache: 'sbt' - name: Check PR run: sbt --mem 4096 --batch ";checkPR;completeQaseRun" env: From 778df869c3ced4040b6381e3a1ee5e6192796fa6 Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Fri, 22 Mar 2024 16:24:50 +0200 Subject: [PATCH 04/15] wip --- .github/workflows/check-pr.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index 288cbf5622..6e8426a66a 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -6,13 +6,14 @@ jobs: check-pr: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: '11' cache: 'sbt' - name: Check PR + if: false run: sbt --mem 4096 --batch ";checkPR;completeQaseRun" env: QASE_ENABLE: true @@ -45,4 +46,4 @@ jobs: run: | sbt_version=$(cut -d\" -f2 version.sbt) pr_number=${{ github.event.number }} - sbt -Dproject.version=$sbt_version-$pr_number-SNAPSHOT --mem 4096 --batch ";publishSigned;sonatypeBundleRelease" + sbt -Dproject.version=$sbt_version-$pr_number-SNAPSHOT --mem 4096 --batch ci-release From cc1fdc0abf218f50b7ac24094a65a2d727e25551 Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Fri, 22 Mar 2024 16:30:00 +0200 Subject: [PATCH 05/15] wip --- .github/workflows/check-pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index 6e8426a66a..c71fb83cdf 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -40,7 +40,7 @@ jobs: if: ${{ contains(github.event.pull_request.labels.*.name, 'publish-snapshots') }} env: PGP_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }} - PGP_SECRET: ${{ secrets.OSSRH_GPG_KEY_BASE64 }} + PGP_SECRET: ${{ secrets.OSSRH_GPG_KEY }} SONATYPE_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} SONATYPE_USERNAME: ${{ secrets.OSSRH_USERNAME }} run: | From 59127656da573c991881ca5830bce58e65ec6eaf Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Fri, 22 Mar 2024 16:33:15 +0200 Subject: [PATCH 06/15] wip --- .github/workflows/check-pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index c71fb83cdf..9137c64133 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -40,7 +40,7 @@ jobs: if: ${{ contains(github.event.pull_request.labels.*.name, 'publish-snapshots') }} env: PGP_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }} - PGP_SECRET: ${{ secrets.OSSRH_GPG_KEY }} + PGP_SECRET: ${{ secrets.OSSRH_GPG_KEY_ASCII }} SONATYPE_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} SONATYPE_USERNAME: ${{ secrets.OSSRH_USERNAME }} run: | From aef7fca9f5e9a8433cdb9566699a735beb6a74b8 Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Mon, 25 Mar 2024 14:38:06 +0200 Subject: [PATCH 07/15] wip --- .github/workflows/check-pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index 9137c64133..b60e657526 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -40,7 +40,7 @@ jobs: if: ${{ contains(github.event.pull_request.labels.*.name, 'publish-snapshots') }} env: PGP_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }} - PGP_SECRET: ${{ secrets.OSSRH_GPG_KEY_ASCII }} + PGP_SECRET: ${{ secrets.GPG_PRIVATE_KEY_BASE64 }} SONATYPE_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} SONATYPE_USERNAME: ${{ secrets.OSSRH_USERNAME }} run: | From aa0a6364a6a0630ceb5b580ea10660c91b0da6b0 Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Mon, 25 Mar 2024 14:45:53 +0200 Subject: [PATCH 08/15] wip --- .github/workflows/check-pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index b60e657526..68768d001e 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -46,4 +46,4 @@ jobs: run: | sbt_version=$(cut -d\" -f2 version.sbt) pr_number=${{ github.event.number }} - sbt -Dproject.version=$sbt_version-$pr_number-SNAPSHOT --mem 4096 --batch ci-release + sbt -Dproject.version=$sbt_version-$pr_number-SNAPSHOT --mem 4096 --batch publishSigned From 12987aa57e311ec5faa0a9ef9d5b2b0211700b62 Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Mon, 25 Mar 2024 14:54:01 +0200 Subject: [PATCH 09/15] wip --- .github/workflows/check-pr.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index 68768d001e..2f982bc8a5 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -12,6 +12,8 @@ jobs: distribution: 'temurin' java-version: '11' cache: 'sbt' + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY_BASE64 }} + gpg-passphrase: PGP_PASSPHRASE - name: Check PR if: false run: sbt --mem 4096 --batch ";checkPR;completeQaseRun" From ab61b030ba1a78b751ae970bddcb74cd507aa0ad Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Mon, 25 Mar 2024 14:56:39 +0200 Subject: [PATCH 10/15] wip --- .github/workflows/check-pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index 2f982bc8a5..2dd97d69cf 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -13,7 +13,7 @@ jobs: java-version: '11' cache: 'sbt' gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY_BASE64 }} - gpg-passphrase: PGP_PASSPHRASE + gpg-passphrase: ${{ secrets.OSSRH_GPG_PASSPHRASE }} - name: Check PR if: false run: sbt --mem 4096 --batch ";checkPR;completeQaseRun" From 559686016b0b174e499d8c988ddc1b14572d4fae Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Mon, 25 Mar 2024 15:12:46 +0200 Subject: [PATCH 11/15] wip --- .github/workflows/check-pr.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index 2dd97d69cf..a7dca03c78 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -12,10 +12,9 @@ jobs: distribution: 'temurin' java-version: '11' cache: 'sbt' - gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY_BASE64 }} + gpg-private-key: ${{ secrets.OSSRH_GPG_KEY }} gpg-passphrase: ${{ secrets.OSSRH_GPG_PASSPHRASE }} - name: Check PR - if: false run: sbt --mem 4096 --batch ";checkPR;completeQaseRun" env: QASE_ENABLE: true @@ -24,6 +23,14 @@ jobs: QASE_PROJECT_CODE: PR QASE_API_TOKEN: ${{ secrets.QASE_API_TOKEN }} CHECKPR_RUN_ID: ${{ github.run_id }} + - uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + lang: + - 'lang/**' + - 'build.sbt' + - 'project/*' - name: Compile external sources if: steps.filter.outputs.lang == 'true' run: | @@ -41,8 +48,6 @@ jobs: - name: Publish snapshots if: ${{ contains(github.event.pull_request.labels.*.name, 'publish-snapshots') }} env: - PGP_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }} - PGP_SECRET: ${{ secrets.GPG_PRIVATE_KEY_BASE64 }} SONATYPE_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} SONATYPE_USERNAME: ${{ secrets.OSSRH_USERNAME }} run: | From 45801a365270d06cc6d599de576fc4ecda96f309 Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Mon, 25 Mar 2024 15:26:21 +0200 Subject: [PATCH 12/15] wip --- .github/workflows/check-pr.yaml | 4 +++- node/src/main/scala/com/wavesplatform/api/http/package.scala | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index a7dca03c78..c3e8bed564 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -4,6 +4,7 @@ on: jobs: check-pr: + name: Check PR runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -12,9 +13,10 @@ jobs: distribution: 'temurin' java-version: '11' cache: 'sbt' - gpg-private-key: ${{ secrets.OSSRH_GPG_KEY }} + gpg-private-key: ${{ secrets.OSSRH_GPG_KEY_ASCII }} gpg-passphrase: ${{ secrets.OSSRH_GPG_PASSPHRASE }} - name: Check PR + if: false run: sbt --mem 4096 --batch ";checkPR;completeQaseRun" env: QASE_ENABLE: true diff --git a/node/src/main/scala/com/wavesplatform/api/http/package.scala b/node/src/main/scala/com/wavesplatform/api/http/package.scala index 635aaa1953..aac72605e4 100644 --- a/node/src/main/scala/com/wavesplatform/api/http/package.scala +++ b/node/src/main/scala/com/wavesplatform/api/http/package.scala @@ -170,7 +170,7 @@ package object http { case NonFatal(e) => logger.error("Uncaught error", e); complete(ApiError.Unknown) } - /** Handles all [[scala.util.control.NonFatal non-fatal]] exceptions and tries to handle fatal errors. + /** Handles all [[scala.util.control.NonFatal]] exceptions and tries to handle fatal errors. * * This directive can't handle __fatal__ errors from: * From b33ca658de817663e59d53fbd9c88dbad5495be6 Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Mon, 25 Mar 2024 15:36:18 +0200 Subject: [PATCH 13/15] wip --- .github/workflows/check-pr.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index c3e8bed564..8b577fd9df 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -13,7 +13,7 @@ jobs: distribution: 'temurin' java-version: '11' cache: 'sbt' - gpg-private-key: ${{ secrets.OSSRH_GPG_KEY_ASCII }} + gpg-private-key: ${{ secrets.OSSRH_GPG_KEY }} gpg-passphrase: ${{ secrets.OSSRH_GPG_PASSPHRASE }} - name: Check PR if: false @@ -52,6 +52,7 @@ jobs: env: SONATYPE_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} SONATYPE_USERNAME: ${{ secrets.OSSRH_USERNAME }} + PGP_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }} run: | sbt_version=$(cut -d\" -f2 version.sbt) pr_number=${{ github.event.number }} From 4cb2dc520957b5dd17bf189e114894a9b1c09dbc Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Mon, 25 Mar 2024 16:19:31 +0200 Subject: [PATCH 14/15] wip --- .github/workflows/check-pr.yaml | 1 - .github/workflows/publish-docker-node.yaml | 43 ++++++------------- .../workflows/publish-node-sbt-builder.yml | 6 +-- .github/workflows/publish-release-jars.yaml | 38 ++++++++++++++++ 4 files changed, 55 insertions(+), 33 deletions(-) create mode 100644 .github/workflows/publish-release-jars.yaml diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index 8b577fd9df..16ea04f501 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -16,7 +16,6 @@ jobs: gpg-private-key: ${{ secrets.OSSRH_GPG_KEY }} gpg-passphrase: ${{ secrets.OSSRH_GPG_PASSPHRASE }} - name: Check PR - if: false run: sbt --mem 4096 --batch ";checkPR;completeQaseRun" env: QASE_ENABLE: true diff --git a/.github/workflows/publish-docker-node.yaml b/.github/workflows/publish-docker-node.yaml index 4a1cbbf583..30938ad106 100644 --- a/.github/workflows/publish-docker-node.yaml +++ b/.github/workflows/publish-docker-node.yaml @@ -8,43 +8,28 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Setup Java - uses: actions/setup-java@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 with: - distribution: 'zulu' + distribution: 'temurin' java-version: '11' + cache: 'sbt' - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Cache SBT - uses: actions/cache@v3 - with: - path: ~/.sbt - key: sbt-cache-${{ hashFiles('project/build.properties') }} - - - name: Cache Coursier - uses: actions/cache@v3 - with: - path: ~/.cache/coursier - key: coursier-cache - - - name: Build sources - run: | - sbt --mem 4096 --batch -J-XX:+UseG1GC -Dcoursier.cache=~/.cache/coursier -Dsbt.boot.directory=~/.sbt ';buildTarballsForDocker;buildRIDERunnerForDocker' + - name: Build tarballs for Docker + run: sbt --mem 4096 --batch ';buildTarballsForDocker;buildRIDERunnerForDocker' - name: Setup Docker buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Log into Docker Hub registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USER }} password: ${{ secrets.DOCKERHUB_PASSWORD }} - name: Extract Docker public node metadata id: meta-public - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: wavesplatform/wavesnode flavor: | @@ -55,7 +40,7 @@ jobs: - name: Extract Docker private node metadata id: meta-private - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: wavesplatform/waves-private-node flavor: | @@ -66,7 +51,7 @@ jobs: - name: Extract Docker RIDE runner metadata id: meta-ride-runner - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: wavesplatform/ride-runner flavor: | @@ -77,7 +62,7 @@ jobs: - name: Build and push Docker public image id: build-and-push-public - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: context: ./docker push: true @@ -86,7 +71,7 @@ jobs: - name: Build and push Docker private image id: build-and-push-private - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: context: ./docker/private push: true @@ -97,7 +82,7 @@ jobs: - name: Build and push Docker RIDE runner image id: build-and-push-ride-runner - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: context: ./ride-runner/docker push: true diff --git a/.github/workflows/publish-node-sbt-builder.yml b/.github/workflows/publish-node-sbt-builder.yml index 91e3a2ab44..aea743f29e 100644 --- a/.github/workflows/publish-node-sbt-builder.yml +++ b/.github/workflows/publish-node-sbt-builder.yml @@ -13,12 +13,12 @@ jobs: run: | echo "waves-version=$(cut -d\" -f2 version.sbt)" >> $GITHUB_OUTPUT echo "sbt-version=$(cut -d= -f2 project/build.properties)" >> $GITHUB_OUTPUT - - uses: docker/setup-buildx-action@v2 - - uses: docker/login-action@v2 + - uses: docker/setup-buildx-action@v3 + - uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USER }} password: ${{ secrets.DOCKERHUB_PASSWORD }} - - uses: docker/build-push-action@v3 + - uses: docker/build-push-action@v5 with: context: ./docker file: ./docker/node-sbt-builder.Dockerfile diff --git a/.github/workflows/publish-release-jars.yaml b/.github/workflows/publish-release-jars.yaml new file mode 100644 index 0000000000..47add376d7 --- /dev/null +++ b/.github/workflows/publish-release-jars.yaml @@ -0,0 +1,38 @@ +name: Publish node and lang jars to Maven Central + +on: + release: + types: [published] + +jobs: + publish-release: + name: Publish jars + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - id: sbt-version + run: | + sbt_version=$(cut -d\" -f2 version.sbt) + echo "sbt_version=$sbt_version" >> "$GITHUB_OUTPUT" + - if: ${{ format('v{0}', steps.sbt-version.outputs.sbt_version) != github.ref_name }} + env: + SBT_VERSION: ${{ steps.sbt-version.outputs.sbt_version }} + RELEASE_VERSION: ${{ github.ref_name }} + run: | + echo "::error::Release version $RELEASE_VERSION does not match SBT version $SBT_VERSION" + exit 1 + - uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '11' + cache: 'sbt' + gpg-private-key: ${{ secrets.OSSRH_GPG_KEY }} + gpg-passphrase: ${{ secrets.OSSRH_GPG_PASSPHRASE }} + - name: Publish snapshots + if: ${{ contains(github.event.pull_request.labels.*.name, 'publish-snapshots') }} + env: + SONATYPE_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + SONATYPE_USERNAME: ${{ secrets.OSSRH_USERNAME }} + PGP_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }} + run: | + sbt --mem 4096 --batch ";publishSigned;sonatypeBundleRelease" From 8e5932c2723a5e9285529aa76fe7ecadcec5eefb Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Fri, 31 May 2024 15:19:07 +0300 Subject: [PATCH 15/15] wip --- node/build.sbt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/node/build.sbt b/node/build.sbt index e7d2a8a2a1..5f3eafe173 100644 --- a/node/build.sbt +++ b/node/build.sbt @@ -18,9 +18,9 @@ javaAgents ++= { } } -publishTo := sonatypePublishToBundle.value +publishTo := sonatypePublishToBundle.value publish / skip := false -homepage := Some(url("https://waves.tech/")) +homepage := Some(url("https://waves.tech/")) developers := List( Developer("ismagin", "Ilya Smagin", "ilya.smagin@gmail.com", url("https://github.com/ismagin")), Developer("asayadyan", "Artyom Sayadyan", "xrtm000@gmail.com", url("https://github.com/xrtm000")), @@ -28,11 +28,14 @@ developers := List( Developer("irakitnykh", "Ivan Rakitnykh", "mrkr.reg@gmail.com", url("https://github.com/mrkraft")), Developer("akiselev", "Alexey Kiselev", "alexey.kiselev@gmail.com>", url("https://github.com/alexeykiselev")), Developer("phearnot", "Sergey Nazarov", "snazarov@web3tech.ru", url("https://github.com/phearnot")), - Developer("tolsi", "Sergey Tolmachev", "tolsi.ru@gmail.com", url("https://github.com/tolsi")) + Developer("tolsi", "Sergey Tolmachev", "tolsi.ru@gmail.com", url("https://github.com/tolsi")), + Developer("vsuharnikov", "Vyatcheslav Suharnikov", "arz.freezy@gmail.com", url("https://github.com/vsuharnikov")), + Developer("ivan-mashonskiy", "Ivan Mashonskii", "ivan.mashonsky@gmail.com", url("https://github.com/ivan-mashonskiy")) ) +versionScheme := Some("pvp") Compile / packageDoc / publishArtifact := true -Test / packageDoc / publishArtifact := false +Test / packageDoc / publishArtifact := false inConfig(Compile)( Seq( @@ -41,7 +44,7 @@ inConfig(Compile)( PB.generate / includeFilter := { (f: File) => (** / "waves" / "*.proto").matches(f.toPath) }, - PB.deleteTargetDirectory := false, + PB.deleteTargetDirectory := false ) ) @@ -85,8 +88,7 @@ linuxScriptReplacements += ("network" -> network.value.toString) inConfig(Universal)( Seq( - packageName := s"waves-${version.value}", - + packageName := s"waves-${version.value}", mappings += (baseDirectory.value / s"waves-sample.conf" -> "doc/waves.conf.sample"), javaOptions ++= Seq( // -J prefix is required by the bash script