Skip to content

Commit

Permalink
project: update the github actions plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
etorreborre committed Aug 10, 2023
1 parent 5c81f25 commit bc88f1b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 39 deletions.
56 changes: 19 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,27 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.8, 2.12.17]
java: [adopt@1.8]
java: [temurin@8]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Java and Scala
uses: olafurpg/setup-scala@v12
- name: Setup Java (temurin@8)
if: matrix.java == 'temurin@8'
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}

- name: Cache sbt
uses: actions/cache@v2
with:
path: |
~/.sbt
~/.ivy2/cache
~/.coursier/cache/v1
~/.cache/coursier/v1
~/AppData/Local/Coursier/Cache/v1
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
distribution: temurin
java-version: 8
cache: sbt

- name: Check that workflows are up to date
run: sbt ++${{ matrix.scala }} githubWorkflowCheck
run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck

- name: Build project
run: sbt ++${{ matrix.scala }} 'testOnly -- xonly exclude ci'
run: sbt '++ ${{ matrix.scala }}' 'testOnly -- xonly exclude ci'

publish:
name: Publish Artifacts
Expand All @@ -62,30 +53,21 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.10]
java: [adopt@1.8]
java: [temurin@8]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Java and Scala
uses: olafurpg/setup-scala@v12
with:
java-version: ${{ matrix.java }}

- name: Cache sbt
uses: actions/cache@v2
- name: Setup Java (temurin@8)
if: matrix.java == 'temurin@8'
uses: actions/setup-java@v3
with:
path: |
~/.sbt
~/.ivy2/cache
~/.coursier/cache/v1
~/.cache/coursier/v1
~/AppData/Local/Coursier/Cache/v1
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
distribution: temurin
java-version: 8
cache: sbt

- name: Publish project
run: sbt ++${{ matrix.scala }} +publish
run: sbt +publish
2 changes: 1 addition & 1 deletion .github/workflows/clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ jobs:
printf "Deleting '%s' #%d, %'d bytes\n" $name ${ARTCOUNT[$name]} $size
ghapi -X DELETE $REPO/actions/artifacts/$id
done
done
done
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.1")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.7")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0")
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.12.0")
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.15.0")

resolvers += Resolver.url("sonatype", new URL("https://oss.sonatype.org/content/repositories/releases"))(Resolver.ivyStylePatterns)

Expand Down

0 comments on commit bc88f1b

Please sign in to comment.