1- # This file was automatically generated by sbt-github-actions using the
2- # githubWorkflowGenerate task. You should add and commit this file to
3- # your git repository. It goes without saying that you shouldn't edit
4- # this file by hand! Instead, if you wish to make changes, you should
5- # change your sbt build configuration to revise the workflow description
6- # to meet your needs, then regenerate this file.
7-
81name : Continuous Integration
92
103on :
114 pull_request :
12- branches : ['**']
135 push :
14- branches : ['**' ]
15- tags : [v* ]
6+ branches : [main ]
7+ tags : ['*' ]
168
179env :
1810 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -23,96 +15,20 @@ jobs:
2315 strategy :
2416 matrix :
2517 os : [ubuntu-latest]
26- scala : [2.12.17]
27- java : [temurin@8]
28- runs-on : ${{ matrix.os }}
29- steps :
30- - name : Checkout current branch (full)
31- uses : actions/checkout@v2
32- with :
33- fetch-depth : 0
34-
35- - name : Setup Java (temurin@8)
36- if : matrix.java == 'temurin@8'
37- uses : actions/setup-java@v2
38- with :
39- distribution : temurin
40- java-version : 8
41-
42- - name : Cache sbt
43- uses : actions/cache@v2
44- with :
45- path : |
46- ~/.sbt
47- ~/.ivy2/cache
48- ~/.coursier/cache/v1
49- ~/.cache/coursier/v1
50- ~/AppData/Local/Coursier/Cache/v1
51- ~/Library/Caches/Coursier/v1
52- key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
53-
54- - name : Check that workflows are up to date
55- run : sbt ++${{ matrix.scala }} githubWorkflowCheck
56-
57- - run : sbt ++${{ matrix.scala }} test scripted
58-
59- - name : Compress target directories
60- run : tar cf targets.tar target project/target
61-
62- - name : Upload target directories
63- uses : actions/upload-artifact@v2
64- with :
65- name : target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
66- path : targets.tar
67-
68- publish :
69- name : Publish Artifacts
70- needs : [build]
71- if : github.event_name != 'pull_request' && (github.ref == 'refs/heads/main')
72- strategy :
73- matrix :
74- os : [ubuntu-latest]
75- scala : [2.12.17]
76- java : [temurin@8]
7718 runs-on : ${{ matrix.os }}
19+ env :
20+ # define Java options for both official sbt and sbt-extras
21+ JAVA_OPTS : -Dfile.encoding=UTF-8
22+ JVM_OPTS : -Dfile.encoding=UTF-8
7823 steps :
79- - name : Checkout current branch (full)
80- uses : actions/checkout@v2
81- with :
82- fetch-depth : 0
83-
84- - name : Setup Java (temurin@8)
85- if : matrix.java == 'temurin@8'
86- uses : actions/setup-java@v2
87- with :
88- distribution : temurin
89- java-version : 8
90-
91- - name : Cache sbt
92- uses : actions/cache@v2
93- with :
94- path : |
95- ~/.sbt
96- ~/.ivy2/cache
97- ~/.coursier/cache/v1
98- ~/.cache/coursier/v1
99- ~/AppData/Local/Coursier/Cache/v1
100- ~/Library/Caches/Coursier/v1
101- key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
102-
103- - name : Download target directories (2.12.17)
104- uses : actions/download-artifact@v2
105- with :
106- name : target-${{ matrix.os }}-2.12.17-${{ matrix.java }}
107-
108- - name : Inflate target directories (2.12.17)
109- run : |
110- tar xf targets.tar
111- rm targets.tar
112-
113- - env :
114- PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
115- PGP_SECRET : ${{ secrets.PGP_SECRET }}
116- SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
117- SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
118- run : sbt ++${{ matrix.scala }} ci-release
24+ - uses : actions/checkout@v3
25+ - name : Set up JVM
26+ uses : actions/setup-java@v3
27+ with :
28+ distribution : ' temurin'
29+ java-version : ' 8'
30+ cache : ' sbt'
31+ - run : sbt -v clean test scripted
32+ - name : Scalafmt
33+ shell : bash
34+ run : sbt -v clean scalafmtSbtCheck scalafmtCheckAll
0 commit comments