2021-12-11 16:09:19 +00:00
|
|
|
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
|
|
|
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
|
|
|
|
|
2022-01-14 04:40:35 +00:00
|
|
|
name: Project Build & Tests
|
2021-12-11 16:09:19 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
# 支持手动触发构建
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
2022-03-24 16:44:01 +00:00
|
|
|
paths-ignore:
|
|
|
|
- .documentation
|
|
|
|
- README.md
|
2022-03-24 16:40:28 +00:00
|
|
|
pull_request:
|
2022-03-24 16:44:01 +00:00
|
|
|
paths-ignore:
|
|
|
|
- .documentation
|
|
|
|
- README.md
|
2021-12-11 16:09:19 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: "Set up JDK"
|
|
|
|
uses: actions/setup-java@v2
|
|
|
|
with:
|
|
|
|
java-version: '11'
|
|
|
|
distribution: 'adopt'
|
|
|
|
- name: "Package"
|
2022-02-11 13:22:03 +00:00
|
|
|
run: mvn -B package --file pom.xml -Dgpg.skip
|
2021-12-11 16:09:19 +00:00
|
|
|
- name: "Target Stage"
|
2021-12-11 16:12:51 +00:00
|
|
|
run: mkdir staging && cp */target/*.jar staging
|
2021-12-11 16:09:19 +00:00
|
|
|
- name: "Upload artifact"
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: Artifact
|
2021-12-11 16:12:51 +00:00
|
|
|
path: staging
|