-
-
Notifications
You must be signed in to change notification settings - Fork 18
39 lines (33 loc) · 1.03 KB
/
release-java.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
name: Test and Release
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
release:
types: [ published ]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: 'sbt'
- name: sbt validation
run: sbt "scalafmtSbtCheck; scalafmtCheckAll; dependencyUpdatesFailBuild; unusedCompileDependenciesTest; undeclaredCompileDependenciesTest; test"
- name: Build fat JAR
run: sbt assembly
- name: Rename fat JAR
if: startsWith(github.ref, 'refs/tags/')
run: cp ./target/scala-2.13/watchlistarr-assembly-0.1.0-SNAPSHOT.jar ./target/scala-2.13/watchlistarr.jar
- name: Upload JAR to GitHub Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./target/scala-2.13/watchlistarr.jar