Skip to content

Commit 0e4ecdd

Browse files
authored
Merge pull request #29 from armanbilge/update/sbt-typelevel-0.5.0-RC1
Update to sbt-typelevel v0.5.0-RC1
2 parents e3bf773 + 318798a commit 0e4ecdd

File tree

3 files changed

+77
-63
lines changed

3 files changed

+77
-63
lines changed

.github/workflows/ci.yml

Lines changed: 74 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -15,56 +15,42 @@ on:
1515
tags: [v*]
1616

1717
env:
18-
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
19-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
20-
SONATYPE_CREDENTIAL_HOST: ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
21-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
22-
PGP_SECRET: ${{ secrets.PGP_SECRET }}
2318
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2419

20+
21+
concurrency:
22+
group: ${{ github.workflow }} @ ${{ github.ref }}
23+
cancel-in-progress: true
24+
2525
jobs:
2626
build:
2727
name: Build and Test
2828
strategy:
2929
matrix:
3030
os: [ubuntu-latest]
31-
scala: [2.12.17, 2.13.10, 3.3.0]
31+
scala: [2.12, 2.13, 3]
3232
java: [temurin@8]
3333
project: [rootJVM]
3434
runs-on: ${{ matrix.os }}
35+
timeout-minutes: 60
3536
steps:
3637
- name: Checkout current branch (full)
3738
uses: actions/checkout@v3
3839
with:
3940
fetch-depth: 0
4041

41-
- name: Download Java (temurin@8)
42-
id: download-java-temurin-8
43-
if: matrix.java == 'temurin@8'
44-
uses: typelevel/download-java@v2
45-
with:
46-
distribution: temurin
47-
java-version: 8
48-
4942
- name: Setup Java (temurin@8)
43+
id: setup-java-temurin-8
5044
if: matrix.java == 'temurin@8'
5145
uses: actions/setup-java@v3
5246
with:
53-
distribution: jdkfile
47+
distribution: temurin
5448
java-version: 8
55-
jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }}
49+
cache: sbt
5650

57-
- name: Cache sbt
58-
uses: actions/cache@v3
59-
with:
60-
path: |
61-
~/.sbt
62-
~/.ivy2/cache
63-
~/.coursier/cache/v1
64-
~/.cache/coursier/v1
65-
~/AppData/Local/Coursier/Cache/v1
66-
~/Library/Caches/Coursier/v1
67-
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
51+
- name: sbt update
52+
if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
53+
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' reload +update
6854

6955
- name: Check that workflows are up to date
7056
run: sbt githubWorkflowCheck
@@ -86,11 +72,11 @@ jobs:
8672

8773
- name: Make target directories
8874
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
89-
run: mkdir -p target .js/target annotation/.jvm/target .jvm/target .native/target project/target
75+
run: mkdir -p annotation/.jvm/target project/target
9076

9177
- name: Compress target directories
9278
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
93-
run: tar cf targets.tar target .js/target annotation/.jvm/target .jvm/target .native/target project/target
79+
run: tar cf targets.tar annotation/.jvm/target project/target
9480

9581
- name: Upload target directories
9682
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
@@ -114,74 +100,102 @@ jobs:
114100
with:
115101
fetch-depth: 0
116102

117-
- name: Download Java (temurin@8)
118-
id: download-java-temurin-8
119-
if: matrix.java == 'temurin@8'
120-
uses: typelevel/download-java@v2
121-
with:
122-
distribution: temurin
123-
java-version: 8
124-
125103
- name: Setup Java (temurin@8)
104+
id: setup-java-temurin-8
126105
if: matrix.java == 'temurin@8'
127106
uses: actions/setup-java@v3
128107
with:
129-
distribution: jdkfile
108+
distribution: temurin
130109
java-version: 8
131-
jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }}
110+
cache: sbt
132111

133-
- name: Cache sbt
134-
uses: actions/cache@v3
135-
with:
136-
path: |
137-
~/.sbt
138-
~/.ivy2/cache
139-
~/.coursier/cache/v1
140-
~/.cache/coursier/v1
141-
~/AppData/Local/Coursier/Cache/v1
142-
~/Library/Caches/Coursier/v1
143-
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
144-
145-
- name: Download target directories (2.12.17, rootJVM)
112+
- name: sbt update
113+
if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
114+
run: sbt reload +update
115+
116+
- name: Download target directories (2.12, rootJVM)
146117
uses: actions/download-artifact@v3
147118
with:
148-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.17-rootJVM
119+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJVM
149120

150-
- name: Inflate target directories (2.12.17, rootJVM)
121+
- name: Inflate target directories (2.12, rootJVM)
151122
run: |
152123
tar xf targets.tar
153124
rm targets.tar
154125
155-
- name: Download target directories (2.13.10, rootJVM)
126+
- name: Download target directories (2.13, rootJVM)
156127
uses: actions/download-artifact@v3
157128
with:
158-
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.10-rootJVM
129+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJVM
159130

160-
- name: Inflate target directories (2.13.10, rootJVM)
131+
- name: Inflate target directories (2.13, rootJVM)
161132
run: |
162133
tar xf targets.tar
163134
rm targets.tar
164135
165-
- name: Download target directories (3.3.0, rootJVM)
136+
- name: Download target directories (3, rootJVM)
166137
uses: actions/download-artifact@v3
167138
with:
168-
name: target-${{ matrix.os }}-${{ matrix.java }}-3.3.0-rootJVM
139+
name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootJVM
169140

170-
- name: Inflate target directories (3.3.0, rootJVM)
141+
- name: Inflate target directories (3, rootJVM)
171142
run: |
172143
tar xf targets.tar
173144
rm targets.tar
174145
175146
- name: Import signing key
176147
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE == ''
148+
env:
149+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
150+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
177151
run: echo $PGP_SECRET | base64 -di | gpg --import
178152

179153
- name: Import signing key and strip passphrase
180154
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE != ''
155+
env:
156+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
157+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
181158
run: |
182159
echo "$PGP_SECRET" | base64 -di > /tmp/signing-key.gpg
183160
echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
184161
(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)
185162
186163
- name: Publish
164+
env:
165+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
166+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
167+
SONATYPE_CREDENTIAL_HOST: ${{ secrets.SONATYPE_CREDENTIAL_HOST }}
187168
run: sbt tlCiRelease
169+
170+
dependency-submission:
171+
name: Submit Dependencies
172+
if: github.event_name != 'pull_request'
173+
strategy:
174+
matrix:
175+
os: [ubuntu-latest]
176+
java: [temurin@8]
177+
runs-on: ${{ matrix.os }}
178+
steps:
179+
- name: Checkout current branch (full)
180+
uses: actions/checkout@v3
181+
with:
182+
fetch-depth: 0
183+
184+
- name: Setup Java (temurin@8)
185+
id: setup-java-temurin-8
186+
if: matrix.java == 'temurin@8'
187+
uses: actions/setup-java@v3
188+
with:
189+
distribution: temurin
190+
java-version: 8
191+
cache: sbt
192+
193+
- name: sbt update
194+
if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
195+
run: sbt '++ ${{ matrix.scala }}' reload +update
196+
197+
- name: Submit Dependencies
198+
uses: scalacenter/sbt-dependency-submission@v2
199+
with:
200+
modules-ignore: root rootJS rootJVM rootNative
201+
configs-ignore: test scala-tool scala-doc-tool

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ ThisBuild / developers := List(
1212

1313
ThisBuild / tlSonatypeUseLegacyHost := false
1414

15-
val Scala212 = "2.12.17"
16-
val Scala213 = "2.13.10"
15+
val Scala212 = "2.12.18"
16+
val Scala213 = "2.13.11"
1717
val Scala3 = "3.3.0"
1818

1919
ThisBuild / scalaVersion := Scala213

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
val SbtTypelevel = "0.4.22"
1+
val SbtTypelevel = "0.5.0-RC1"
22

33
addSbtPlugin("org.typelevel" % "sbt-typelevel" % SbtTypelevel)
44
addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % SbtTypelevel)

0 commit comments

Comments
 (0)