forked from Slimefun/Slimefun4
-
-
Notifications
You must be signed in to change notification settings - Fork 61
50 lines (47 loc) · 1.49 KB
/
build-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
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Slimefun Builder
on:
push:
branches:
- master
paths:
- 'src/**'
- 'pom.xml'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 17
java-package: jdk
architecture: x64
- name: Codestyle Check
run: mvn -B spotless:check -s $GITHUB_WORKSPACE/settings.xml --file pom.xml --errors
- name: Build Slimefun
run: mvn -B package -s $GITHUB_WORKSPACE/settings.xml --file pom.xml --errors
- uses: actions/cache@v2
name: Cache dependencies
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- uses: actions/upload-artifact@v2
name: Upload Beta artifact
with:
name: Slimefun Beta Build
path: staging
- name: Automatic Releases
uses: marvinpinto/[email protected]
if: github.ref_name == 'master'
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "exp"
prerelease: true
title: "Slimefun 自动构建版本"
files: |
target/Slimefun-*.jar