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
|
|
|
|
|
|
|
|
name: Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
# 支持手动触发构建
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
|
|
|
|
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"
|
2021-12-14 12:03:47 +00:00
|
|
|
run: mvn -B package --file pom.xml -Dmaven.javadoc.skip=true
|
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
|