Skip to content

Commit

Permalink
Update actions/checkout action to v4 (#38)
Browse files Browse the repository at this point in the history
* Update actions/checkout action to v4

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Andrei Silviu Dragnea <[email protected]>
  • Loading branch information
renovate[bot] and andreisilviudragnea authored Feb 13, 2024
1 parent ebec9f2 commit d970871
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 47 deletions.
65 changes: 19 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,22 @@ jobs:
timeout-minutes: 60
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download Java (oracle@20)
id: download-java-oracle-20
if: matrix.java == 'oracle@20'
uses: typelevel/download-java@v2
with:
distribution: oracle
java-version: 20

- name: Setup Java (oracle@20)
id: setup-java-oracle-20
if: matrix.java == 'oracle@20'
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: jdkfile
distribution: oracle
java-version: 20
jdkFile: ${{ steps.download-java-oracle-20.outputs.jdkFile }}
cache: sbt

- name: sbt update
if: matrix.java == 'oracle@20' && steps.setup-java-oracle-20.outputs.cache-hit == 'false'
run: sbt '++ ${{ matrix.scala }}' reload +update
run: sbt +update

- name: Check that workflows are up to date
run: sbt githubWorkflowCheck
Expand Down Expand Up @@ -88,7 +79,7 @@ jobs:

- name: Upload target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}
path: targets.tar
Expand All @@ -100,39 +91,29 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13.11]
java: [oracle@20]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download Java (oracle@20)
id: download-java-oracle-20
if: matrix.java == 'oracle@20'
uses: typelevel/download-java@v2
with:
distribution: oracle
java-version: 20

- name: Setup Java (oracle@20)
id: setup-java-oracle-20
if: matrix.java == 'oracle@20'
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: jdkfile
distribution: oracle
java-version: 20
jdkFile: ${{ steps.download-java-oracle-20.outputs.jdkFile }}
cache: sbt

- name: sbt update
if: matrix.java == 'oracle@20' && steps.setup-java-oracle-20.outputs.cache-hit == 'false'
run: sbt '++ ${{ matrix.scala }}' reload +update
run: sbt +update

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

Expand All @@ -146,15 +127,15 @@ jobs:
env:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
run: echo $PGP_SECRET | base64 -di | gpg --import
run: echo $PGP_SECRET | base64 -d -i - | gpg --import

- name: Import signing key and strip passphrase
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE != ''
env:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
run: |
echo "$PGP_SECRET" | base64 -di > /tmp/signing-key.gpg
echo "$PGP_SECRET" | base64 -d -i - > /tmp/signing-key.gpg
echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
(echo "$PGP_PASSPHRASE"; echo; echo) | gpg --command-fd 0 --pinentry-mode loopback --change-passphrase $(gpg --list-secret-keys --with-colons 2> /dev/null | grep '^sec:' | cut --delimiter ':' --fields 5 | tail -n 1)
Expand All @@ -163,44 +144,36 @@ jobs:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_CREDENTIAL_HOST: ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
run: sbt '++ ${{ matrix.scala }}' tlCiRelease
run: sbt tlCiRelease

dependency-submission:
name: Submit Dependencies
if: github.event_name != 'pull_request'
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13.11]
java: [oracle@20]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download Java (oracle@20)
id: download-java-oracle-20
if: matrix.java == 'oracle@20'
uses: typelevel/download-java@v2
with:
distribution: oracle
java-version: 20

- name: Setup Java (oracle@20)
id: setup-java-oracle-20
if: matrix.java == 'oracle@20'
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: jdkfile
distribution: oracle
java-version: 20
jdkFile: ${{ steps.download-java-oracle-20.outputs.jdkFile }}
cache: sbt

- name: sbt update
if: matrix.java == 'oracle@20' && steps.setup-java-oracle-20.outputs.cache-hit == 'false'
run: sbt '++ ${{ matrix.scala }}' reload +update
run: sbt +update

- name: Submit Dependencies
uses: scalacenter/sbt-dependency-submission@v2
with:
configs-ignore: test scala-tool scala-doc-tool test-internal
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.5.0-M10")
addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.6.5")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0")

0 comments on commit d970871

Please sign in to comment.