Skip to content

Commit

Permalink
Update sbt-github-actions to 0.14.2 (#1216)
Browse files Browse the repository at this point in the history
* Update sbt-github-actions to 0.14.2

* Update sbt-github-actions to 0.24.0

---------

Co-authored-by: Georgi Krastev <[email protected]>
  • Loading branch information
scala-steward and joroKr21 authored Feb 27, 2025
1 parent cb0584b commit f94fdcb
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 40 deletions.
62 changes: 25 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,48 +25,42 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.12.20, 2.13.11]
java: [adopt@1.8]
java: [temurin@8]
platform: [jvm, js, native]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

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

- 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') }}
- name: Setup sbt
uses: sbt/setup-sbt@v1

- run: sudo apt install clang libunwind-dev libgc-dev libre2-dev

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

- name: Validate JVM
if: matrix.platform == 'jvm'
run: sbt ++${{ matrix.scala }} validateJVM
run: sbt '++ ${{ matrix.scala }}' validateJVM

- name: Validate JavaScript
if: matrix.platform == 'js'
run: sbt ++${{ matrix.scala }} validateJS
run: sbt '++ ${{ matrix.scala }}' validateJS

- name: Validate Scala Native
if: matrix.platform == 'native'
run: sbt ++${{ matrix.scala }} validateNative
run: sbt '++ ${{ matrix.scala }}' validateNative

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

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

- 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') }}
- name: Setup sbt
uses: sbt/setup-sbt@v1

- uses: olafurpg/setup-gpg@v3

Expand All @@ -108,4 +96,4 @@ jobs:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
run: sbt ++${{ matrix.scala }} ci-release
run: sbt ci-release
3 changes: 2 additions & 1 deletion .github/workflows/clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Delete artifacts
shell: bash {0}
run: |
# Customize those three lines with your repository and credentials:
REPO=${GITHUB_API_URL}/repos/${{ github.repository }}
Expand All @@ -25,7 +26,7 @@ jobs:
ghapi() { curl --silent --location --user _:$GITHUB_TOKEN "$@"; }
# A temporary file which receives HTTP response headers.
TMPFILE=/tmp/tmp.$$
TMPFILE=$(mktemp)
# An associative array, key: artifact name, value: number of artifacts of that name.
declare -A ARTCOUNT
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ThisBuild / mimaFailOnNoPrevious := false
// GHA configuration

ThisBuild / githubWorkflowBuildPreamble := Seq(WorkflowStep.Run(List("sudo apt install clang libunwind-dev libgc-dev libre2-dev")))
ThisBuild / githubWorkflowJavaVersions := Seq("[email protected]")
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("8"))
ThisBuild / githubWorkflowBuildMatrixAdditions += "platform" -> List("jvm", "js", "native")
ThisBuild / githubWorkflowArtifactUpload := false
ThisBuild / githubWorkflowBuildMatrixFailFast := Some(false)
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.6")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2")
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.13.0")
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.24.0")

0 comments on commit f94fdcb

Please sign in to comment.