File tree Expand file tree Collapse file tree 1 file changed +29
-8
lines changed Expand file tree Collapse file tree 1 file changed +29
-8
lines changed Original file line number Diff line number Diff line change @@ -2,21 +2,42 @@ name: Release
2
2
3
3
on :
4
4
push :
5
- tags : ["*"]
6
- workflow_dispatch :
7
- branches :
8
- - master
9
-
5
+ branches :
6
+ - $default-branch
7
+ tags :
8
+ - ' v* '
9
+
10
10
jobs :
11
- publish :
11
+ build :
12
12
runs-on : ubuntu-latest
13
13
steps :
14
14
- uses : actions/checkout@v2
15
- - uses : olafurpg/setup-scala@v2
16
- - name : Publish
15
+ with :
16
+ # We need to unshallow to allow git describe work with last tag
17
+ fetch-depth : 0
18
+ - uses : actions/setup-java@v1
19
+ with :
20
+ java-version : 8
21
+ - uses : coursier/cache-action@v5
22
+ - id : test
23
+ name : Test
24
+ env :
25
+ GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
26
+ run : sbt test
27
+ - id : publish-sonatype
28
+ name : Publish Sonatype
17
29
env :
30
+ GITHUB_TOKEN : " ${{ secrets.GITHUB_TOKEN }}"
18
31
PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
19
32
PGP_SECRET : ${{ secrets.PGP_SECRET }}
20
33
SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
21
34
SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
22
35
run : sbt ci-release
36
+ - name : Send slack notification
37
+ uses : act10ns/slack@v1
38
+ env :
39
+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
40
+ with :
41
+ status : ${{ job.status }}
42
+ steps : ${{ toJson(steps) }}
43
+ if : failure() && env.SLACK_WEBHOOK_URL
You can’t perform that action at this time.
0 commit comments