Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub actions to use Node.js 16. #133

Merged
merged 1 commit into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ jobs:
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 (temurin@11)
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
Expand All @@ -46,7 +46,7 @@ jobs:
java: java11

- name: Cache sbt
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.sbt
Expand All @@ -55,7 +55,7 @@ jobs:
~/.cache/coursier/v1
~/AppData/Local/Coursier/Cache/v1
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
key: ${{ runner.os }}-sbt-cache-v3-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Check that workflows are up to date
run: sbt ++${{ matrix.scala }} githubWorkflowCheck
Expand All @@ -66,7 +66,7 @@ jobs:
run: tar cf targets.tar target project/target

- name: Upload target directories
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
path: targets.tar
Expand All @@ -83,13 +83,13 @@ jobs:
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 (temurin@11)
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
Expand All @@ -102,7 +102,7 @@ jobs:
java: java11

- name: Cache sbt
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.sbt
Expand All @@ -111,10 +111,10 @@ jobs:
~/.cache/coursier/v1
~/AppData/Local/Coursier/Cache/v1
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
key: ${{ runner.os }}-sbt-cache-v3-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Download target directories (2.12.15)
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: target-${{ matrix.os }}-2.12.15-${{ matrix.java }}

Expand Down
8 changes: 4 additions & 4 deletions src/main/scala/sbtghactions/GenerativePlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ ${indent(jobs.map(compileJob(_, sbt)).mkString("\n\n"), 1)}
UseRef.Public(
"actions",
"upload-artifact",
"v2"),
"v3"),
name = Some(s"Upload target directories"),
params = Map(
"name" -> s"target-$${{ matrix.os }}-$${{ matrix.scala }}-$${{ matrix.java }}",
Expand All @@ -628,7 +628,7 @@ ${indent(jobs.map(compileJob(_, sbt)).mkString("\n\n"), 1)}
UseRef.Public(
"actions",
"download-artifact",
"v2"),
"v3"),
name = Some(s"Download target directories ($v)"),
params = Map(
"name" -> s"target-$${{ matrix.os }}-$v-$${{ matrix.java }}"))
Expand Down Expand Up @@ -656,7 +656,7 @@ ${indent(jobs.map(compileJob(_, sbt)).mkString("\n\n"), 1)}
UseRef.Public(
"actions",
"cache",
"v2"),
"v3"),
name = Some("Cache sbt"),
params = Map(
"path" -> Seq(
Expand All @@ -667,7 +667,7 @@ ${indent(jobs.map(compileJob(_, sbt)).mkString("\n\n"), 1)}
"~/AppData/Local/Coursier/Cache/v1",
"~/Library/Caches/Coursier/v1"
).mkString("\n"),
"key" -> s"$${{ runner.os }}-sbt-cache-v2-${hashes.mkString("-")}"
"key" -> s"$${{ runner.os }}-sbt-cache-v3-${hashes.mkString("-")}"
)
)
)
Expand Down
6 changes: 3 additions & 3 deletions src/main/scala/sbtghactions/WorkflowStep.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ sealed trait WorkflowStep extends Product with Serializable {
object WorkflowStep {

val CheckoutFull: WorkflowStep = Use(
UseRef.Public("actions", "checkout", "v2"),
UseRef.Public("actions", "checkout", "v3"),
name = Some("Checkout current branch (full)"),
params = Map("fetch-depth" -> "0"))

val Checkout: WorkflowStep = Use(UseRef.Public("actions", "checkout", "v2"), name = Some("Checkout current branch (fast)"))
val Checkout: WorkflowStep = Use(UseRef.Public("actions", "checkout", "v3"), name = Some("Checkout current branch (fast)"))

def SetupJava(versions: List[JavaSpec]): List[WorkflowStep] =
versions map {
Expand All @@ -45,7 +45,7 @@ object WorkflowStep {

case jv @ JavaSpec(dist, version) =>
WorkflowStep.Use(
UseRef.Public("actions", "setup-java", "v2"),
UseRef.Public("actions", "setup-java", "v3"),
name = Some(s"Setup Java (${jv.render})"),
cond = Some(s"matrix.java == '${jv.render}'"),
params = Map(
Expand Down
22 changes: 11 additions & 11 deletions src/sbt-test/sbtghactions/check-and-regenerate/expected-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ jobs:
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 (temurin@11)
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
Expand All @@ -54,7 +54,7 @@ jobs:
java: java8

- name: Cache sbt
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.sbt
Expand All @@ -63,7 +63,7 @@ jobs:
~/.cache/coursier/v1
~/AppData/Local/Coursier/Cache/v1
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
key: ${{ runner.os }}-sbt-cache-v3-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Check that workflows are up to date
run: sbt ++${{ matrix.scala }} githubWorkflowCheck
Expand All @@ -77,7 +77,7 @@ jobs:
run: tar cf targets.tar target project/target

- name: Upload target directories
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
path: targets.tar
Expand All @@ -94,13 +94,13 @@ jobs:
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 (temurin@11)
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
Expand All @@ -113,7 +113,7 @@ jobs:
java: java8

- name: Cache sbt
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.sbt
Expand All @@ -122,10 +122,10 @@ jobs:
~/.cache/coursier/v1
~/AppData/Local/Coursier/Cache/v1
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
key: ${{ runner.os }}-sbt-cache-v3-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Download target directories (2.13.6)
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: target-${{ matrix.os }}-2.13.6-${{ matrix.java }}

Expand All @@ -135,7 +135,7 @@ jobs:
rm targets.tar

- name: Download target directories (2.12.15)
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: target-${{ matrix.os }}-2.12.15-${{ matrix.java }}

Expand Down
22 changes: 11 additions & 11 deletions src/sbt-test/sbtghactions/no-clean/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ jobs:
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 (temurin@11)
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11

- name: Cache sbt
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.sbt
Expand All @@ -48,7 +48,7 @@ jobs:
~/.cache/coursier/v1
~/AppData/Local/Coursier/Cache/v1
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
key: ${{ runner.os }}-sbt-cache-v3-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Check that workflows are up to date
run: sbt ++${{ matrix.scala }} githubWorkflowCheck
Expand All @@ -60,7 +60,7 @@ jobs:
run: tar cf targets.tar target project/target

- name: Upload target directories
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
path: targets.tar
Expand All @@ -77,19 +77,19 @@ jobs:
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 (temurin@11)
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11

- name: Cache sbt
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.sbt
Expand All @@ -98,10 +98,10 @@ jobs:
~/.cache/coursier/v1
~/AppData/Local/Coursier/Cache/v1
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
key: ${{ runner.os }}-sbt-cache-v3-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Download target directories (2.13.6)
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: target-${{ matrix.os }}-2.13.6-${{ matrix.java }}

Expand All @@ -111,7 +111,7 @@ jobs:
rm targets.tar

- name: Download target directories (2.12.15)
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: target-${{ matrix.os }}-2.12.15-${{ matrix.java }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ jobs:
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 (temurin@11)
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11

- name: Cache sbt
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.sbt
Expand All @@ -48,7 +48,7 @@ jobs:
~/.cache/coursier/v1
~/AppData/Local/Coursier/Cache/v1
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
key: ${{ runner.os }}-sbt-cache-v3-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Check that workflows are up to date
run: sbt ++${{ matrix.scala }} githubWorkflowCheck
Expand All @@ -59,7 +59,7 @@ jobs:
run: tar cf targets.tar target withTarget/target project/target

- name: Upload target directories
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
path: targets.tar
Expand All @@ -76,19 +76,19 @@ jobs:
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 (temurin@11)
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11

- name: Cache sbt
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.sbt
Expand All @@ -97,10 +97,10 @@ jobs:
~/.cache/coursier/v1
~/AppData/Local/Coursier/Cache/v1
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
key: ${{ runner.os }}-sbt-cache-v3-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Download target directories (2.13.6)
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: target-${{ matrix.os }}-2.13.6-${{ matrix.java }}

Expand Down
Loading