diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ea77a5c..7d9c662 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,22 +6,17 @@ on: jobs: publish: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v1 with: - java-version: 11 - - name: Cache sbt - uses: actions/cache@v2 - with: - path: | - ~/.ivy2/cache - ~/.sbt - key: ${{ runner.os }}-sbt-${{ hashFiles('build.sbt', 'project/plugins.sbt') }} + fetch-depth: 0 + - uses: olafurpg/setup-scala@v10 + - uses: olafurpg/setup-gpg@v3 - name: Publish ${{ github.ref }} - run: sbt publish + run: sbt ci-release env: - BINTRAY_USER: ${{ secrets.BINTRAY_USER }} - BINTRAY_PASS: ${{ secrets.BINTRAY_PASS }} + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} + PGP_SECRET: ${{ secrets.PGP_SECRET }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 77accfb..69a6aec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,17 +10,13 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Java 11 uses: actions/setup-java@v1 with: java-version: 11 - - name: Cache sbt - uses: actions/cache@v2 - with: - path: | - ~/.ivy2/cache - ~/.sbt - key: ${{ runner.os }}-sbt-${{ hashFiles('build.sbt', 'project/plugins.sbt') }} + - name: Coursier cache + uses: coursier/cache-action@v5 - name: Run tests for ${{ github.ref }} run: sbt scripted diff --git a/project/plugins.sbt b/project/plugins.sbt index 73e4ef5..a6ca3a3 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,3 @@ -addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1") -addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0") -addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.6.1") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") +addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7") +addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2")