-
Notifications
You must be signed in to change notification settings - Fork 25
44 lines (40 loc) · 1012 Bytes
/
build.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
name: build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
matrix:
java: [11]
steps:
- uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v3
env:
cache-name: cache-sbt-libs
with:
path: |
~/.ivy2/cache
~/.sbt
~/.coursier
key: build-${{ env.cache-name }}-${{ hashFiles('build.sbt') }}
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java }}
- name: Run tests
run: |
git clone https://github.com/gitbucket/gitbucket.git
cd gitbucket
sbt publishLocal
cd ../
sbt test
- name: Assembly
run: sbt assembly
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: gitbucket-gist-plugin-java${{ matrix.java }}-${{ github.sha }}
path: ./target/scala-2.13/*.jar