generated from ikaros-dev/plugin-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.45 KB
/
ci_build_jar.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
# This is a basic workflow to help you get started with Actions
name: Build FastJar
# Controls when the workflow will run
on:
release:
types: [published]
jobs:
release:
if: github.repository == 'ikaros-dev/plugin-alist'
name: Build with java 17 and upload
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Git submodule init
uses: snickerbockers/submodules-init@v4
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
cache: 'gradle'
java-version: 17
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Clean with gradle
run: |
./gradlew clean
- name: Build console with npm
run: |
./gradlew buildFrontend -x test
- name: Build server with gradle
run: |
./gradlew build -x test
- name: Get Project Version
id: get_version
run: echo "::set-output name=version::$(cat gradle.properties | grep ^version= | cut -d'=' -f2)"
- name: Upload lib jar to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.LI_GUOHAO_TOKEN }}
file: /home/runner/work/plugin-alist/plugin-alist/build/libs/plugin-alist-${{steps.get_version.outputs.version}}.jar
asset_name: plugin-alist-${{steps.get_version.outputs.version}}.jar