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
+
8
+ name : Continuous Integration
9
+
10
+ on :
11
+ pull_request :
12
+ branches : ['**']
13
+ push :
14
+ branches : ['**']
15
+ tags : [v*]
16
+
17
+ env :
18
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
19
+
20
+ jobs :
21
+ build :
22
+ name : Build and Test
23
+ strategy :
24
+ matrix :
25
+ os : [ubuntu-latest]
26
+ scala : [2.12.10, 2.13.6, 3.0.1]
27
+
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 and Scala
36
+ uses : olafurpg/setup-scala@v12
37
+ with :
38
+ java-version : ${{ matrix.java }}
39
+
40
+ - name : Cache sbt
41
+ uses : actions/cache@v2
42
+ with :
43
+ path : |
44
+ ~/.sbt
45
+ ~/.ivy2/cache
46
+ ~/.coursier/cache/v1
47
+ ~/.cache/coursier/v1
48
+ ~/AppData/Local/Coursier/Cache/v1
49
+ ~/Library/Caches/Coursier/v1
50
+ key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
51
+
52
+ - name : Setup Ruby
53
+ if : matrix.scala == '2.13.6'
54
+ uses : ruby/setup-ruby@v1
55
+ with :
56
+ ruby-version : 3.0.1
57
+
58
+ - name : Install microsite dependencies
59
+ if : matrix.scala == '2.13.6'
60
+ run : |
61
+ gem install saas
62
+ gem install jekyll -v 4.2.0
63
+
64
+ - name : Check that workflows are up to date
65
+ run : sbt --client '++${{ matrix.scala }}; githubWorkflowCheck'
66
+
67
+ - run : sbt --client '++${{ matrix.scala }}; test; mimaReportBinaryIssues'
68
+
69
+ - if : matrix.scala == '2.13.6'
70
+ run : sbt --client '++${{ matrix.scala }}; site/makeMicrosite'
71
+
72
+ publish :
73
+ name : Publish Artifacts
74
+ needs : [build]
75
+ if : github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
76
+ strategy :
77
+ matrix :
78
+ os : [ubuntu-latest]
79
+ scala : [3.0.1]
80
+
81
+ runs-on : ${{ matrix.os }}
82
+ steps :
83
+ - name : Checkout current branch (full)
84
+ uses : actions/checkout@v2
85
+ with :
86
+ fetch-depth : 0
87
+
88
+ - name : Setup Java and Scala
89
+ uses : olafurpg/setup-scala@v12
90
+ with :
91
+ java-version : ${{ matrix.java }}
92
+
93
+ - name : Cache sbt
94
+ uses : actions/cache@v2
95
+ with :
96
+ path : |
97
+ ~/.sbt
98
+ ~/.ivy2/cache
99
+ ~/.coursier/cache/v1
100
+ ~/.cache/coursier/v1
101
+ ~/AppData/Local/Coursier/Cache/v1
102
+ ~/Library/Caches/Coursier/v1
103
+ key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
104
+
105
+ - uses : olafurpg/setup-gpg@v3
106
+
107
+ - name : Setup Ruby
108
+ uses : ruby/setup-ruby@v1
109
+ with :
110
+ ruby-version : 3.0.1
111
+
112
+ - name : Install microsite dependencies
113
+ run : |
114
+ gem install saas
115
+ gem install jekyll -v 4.2.0
116
+
117
+ - name : Publish artifacts to Sonatype
118
+ env :
119
+ PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
120
+ PGP_SECRET : ${{ secrets.PGP_SECRET }}
121
+ SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
122
+ SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
123
+ run : sbt --client '++${{ matrix.scala }}; ci-release'
124
+
125
+ - uses : christopherdavenport/create-ghpages-ifnotexists@v1
126
+
127
+ - name : Publish microsite
128
+ run : sbt --client '++${{ matrix.scala }}; site/publishMicrosite'
0 commit comments