-
-
Notifications
You must be signed in to change notification settings - Fork 10
50 lines (43 loc) · 1.25 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: CI-CD
on:
push:
branches: [ main ]
tags: [ "*" ]
pull_request:
jobs:
build:
strategy:
fail-fast: true
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: self publish
run: make prePublishForSelfUse
- name: tests
run: sbt ";clean ;Test/compile ;coverage ;test; set isSnapshot := true; scripted ;coverageReport ;coveralls"
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
release:
needs: build
strategy:
fail-fast: true
runs-on: ubuntu-latest
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: release-staging
run: |
make prePublishForSelfUse
sbt ";set isSnapshot := true ; ci-release"
if: startsWith(github.ref, 'refs/tags/') != true && github.ref == 'refs/heads/main'
- name: release-production
run: |
make prePublishForSelfUse
sbt ci-release
if: startsWith(github.ref, 'refs/tags/v')