diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index d0dcce3..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Publish -on: - push: - tags: - - 'v*' - workflow_dispatch: -jobs: - test: - uses: ./.github/workflows/test.yml - publish: - needs: test - environment: production - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup JDK - uses: actions/setup-java@v3 - with: - distribution: oracle - java-version: 17 - - name: Configure GPG Key - env: - GPG_KEY: ${{ secrets.GPG_KEY }} - run: | - echo -n "$GPG_KEY" | base64 --decode | gpg --import - - name: Prepare environment - env: - SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} - run: | - mkdir -p ~/.sbt/1.0 - touch ~/.sbt/1.0/sonatype.sbt - echo "credentials += Credentials(Path.userHome / \".sbt\" / \"sonatype_credentials\")" > ~/.sbt/1.0/sonatype.sbt - touch ~/.sbt/sonatype_credentials - echo "realm=Sonatype Nexus Repository Manager" > ~/.sbt/sonatype_credentials - echo "host=s01.oss.sonatype.org" >> ~/.sbt/sonatype_credentials - echo "user=$SONATYPE_USERNAME" >> ~/.sbt/sonatype_credentials - echo "password=$SONATYPE_PASSWORD" >> ~/.sbt/sonatype_credentials - mkdir ~/.sbt/1.0/plugins - touch ~/.sbt/1.0/plugins/gpg.sbt - echo "addSbtPlugin(\"com.github.sbt\" % \"sbt-pgp\" % \"2.1.2\")" > ~/.sbt/1.0/plugins/gpg.sbt - - name: Deploy - run: sbt publishSigned - - name: Message - run: echo "Staging repository created at https://s01.oss.sonatype.org/#stagingRepositories" \ No newline at end of file diff --git a/build.sbt b/build.sbt index d50bcdb..ba7b75f 100644 --- a/build.sbt +++ b/build.sbt @@ -1,14 +1,18 @@ // Project info name := "VecMatLib" homepage := Some(url("https://github.com/ScalaMath/VecMatLib")) +version := "3.0" +description := "A Scala library for vectors and matrix math" +// Organization info organization := "io.github.scalamath" organizationName := "ScalaMath" organizationHomepage := Some(url("https://github.com/ScalaMath")) -version := "3.0" -description := "A Scala library for vectors and matrix math" // Project scala version scalaVersion := "2.13.12" +// Do not append the scala version to the generated artifact +crossPaths := false + // Scala test dependency libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.18" % Test // Junit test dependency @@ -40,11 +44,7 @@ licenses := List( "Apache 2" -> new URL("https://www.apache.org/licenses/LICENSE-2.0.txt") ) -// Maven publishing +// Publish to local repository pomIncludeRepository := { _ => false } -publishTo := { - val nexus = "https://s01.oss.sonatype.org/" - if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots") - else Some("releases" at nexus + "service/local/staging/deploy/maven2") -} +publishTo := Some(Resolver.file("local-ivy", file(Path.userHome + "/.ivy2"))) publishMavenStyle := true \ No newline at end of file diff --git a/project/plugins.sbt b/project/plugins.sbt new file mode 100644 index 0000000..29e1b63 --- /dev/null +++ b/project/plugins.sbt @@ -0,0 +1 @@ +addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1") \ No newline at end of file