-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (40 loc) · 1.05 KB
/
ci.yaml
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
name: Tests
on:
pull_request:
push:
branches:
- main
tags:
- '*'
jobs:
test:
name: Test scalafix rules
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: coursier/cache-action@v6
- uses: coursier/setup-action@v1
with:
jvm: temurin:17
- name: Test rules
run: sbt "+test"
publish_release:
runs-on: [ubuntu-22.04]
needs: [test]
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
steps:
- uses: coursier/setup-action@v1
with:
jvm: temurin:8
- uses: actions/checkout@v4
- name: Setup PGP Key
run: |
echo -n "$PGP_SECRET" | base64 --decode | gpg --batch --import
env:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
- name: Publish release
env:
PGP_PW: ${{ secrets.PGP_PW }}
SONATYPE_PW: ${{ secrets.MAVEN_PASSWORD }}
SONATYPE_USER: ${{ secrets.MAVEN_USER }}
run: sbt "+rules/publishSigned; sonatypeBundleRelease"