Skip to content

Commit 26b2258

Browse files
committed
Merge branch 'template' of github.com:ThoughtWorksInc/scala-project-template into template
2 parents 6f76452 + b78f28d commit 26b2258

File tree

7 files changed

+46
-13
lines changed

7 files changed

+46
-13
lines changed

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Scala Steward: Reformat with scalafmt 3.1.2
2+
fb6cfb8aea15a1b339e3ed69e1e96acd7df4cae6
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
on:
2+
push:
3+
branches-ignore:
4+
- 'update/**'
5+
schedule:
6+
- cron: '0 0 * * 0'
7+
8+
name: Launch Scala Steward
9+
10+
jobs:
11+
scala-steward:
12+
runs-on: ubuntu-22.04
13+
name: Launch Scala Steward
14+
steps:
15+
- name: Launch Scala Steward
16+
uses: scala-steward-org/scala-steward-action@v2
17+
with:
18+
github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }}
19+
branches: ${{ github.ref_name }}

.github/workflows/scala.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
name: Scala CI
22

33
on:
4-
- push
5-
- pull_request
4+
push:
5+
branches-ignore:
6+
- 'update/**'
7+
pull_request:
68

79
jobs:
810
build:
@@ -39,6 +41,6 @@ jobs:
3941
run: sbt ++${{ matrix.scala }} test
4042
- name: Publish to Maven Central Repository
4143
env:
42-
SECRET_GIST: ${{secrets.SECRET_GIST}}
43-
if: ${{ env.SECRET_GIST != '' }}
44+
GITHUB_PERSONAL_ACCESS_TOKEN: ${{secrets.PERSONAL_ACCESS_TOKEN}}
45+
if: ${{ env.GITHUB_PERSONAL_ACCESS_TOKEN != '' && github.event_name != 'pull_request' }}
4446
run: sbt ++${{ matrix.scala }} "set every Seq(sonatypeSessionName := \"${{github.workflow}} ${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}-$$ ${{ matrix.scala }}\", publishTo := sonatypePublishToBundle.value)" publishSigned sonatypeBundleRelease

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
runner.dialect = scala212source3
2-
version = "3.1.1"
2+
version = "3.6.1"
33
maxColumn = 80

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.7.3
1+
sbt.version=1.8.2

project/plugins.sbt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
addSbtPlugin("com.thoughtworks.sbt-best-practice" % "sbt-best-practice" % "8.2.4")
1+
addSbtPlugin(
2+
"com.thoughtworks.sbt-best-practice" % "sbt-best-practice" % "8.2.4"
3+
)
24

3-
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.8")
5+
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.15")
46

5-
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.0.0")
7+
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1")
68

7-
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.2")
9+
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1")
810

911
addSbtPlugin("org.lyranthe.sbt" % "partial-unification" % "1.1.2")
1012

11-
addSbtPlugin("com.thoughtworks.example" % "sbt-example" % "7.0.0")
13+
addSbtPlugin("com.thoughtworks.example" % "sbt-example" % "9.2.1")

secret.sbt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
lazy val secret = {
2-
for (gist <- sys.env.get("SECRET_GIST")) yield {
2+
for (token <- sys.env.get("GITHUB_PERSONAL_ACCESS_TOKEN")) yield {
33
val secret = project.settings(publish / skip := true).in {
44
val secretDirectory = file(sourcecode.File()).getParentFile / "secret"
55
IO.delete(secretDirectory)
66
org.eclipse.jgit.api.Git
77
.cloneRepository()
8-
.setURI(gist)
8+
.setURI(
9+
"https://github.com/Atry/secrets.git"
10+
)
911
.setDirectory(secretDirectory)
12+
.setCredentialsProvider(
13+
new org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider(
14+
token,
15+
""
16+
)
17+
)
1018
.call()
1119
.close()
1220
secretDirectory

0 commit comments

Comments
 (0)