-
Notifications
You must be signed in to change notification settings - Fork 5
67 lines (54 loc) · 1.84 KB
/
maven.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Release Maven
on: workflow_dispatch
# on:
# push:
# tags:
# - '*'
#on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
distribution: "Liberica"
java-version: 1.8
java-package: jdk+fx
- name: Build with Maven
run:
mvn clean package -DskipTests=true -Dmaven.javadoc.skip=true -B -V
- name: Create Release
id: create_release
uses: SummerSec/create-release@master
with:
tag_name: ${{ github.ref }}
release-name: Release ${{ github.ref }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.RELEASE }}
- name: Upload a Build Artifact
id: upload-build-artifact
uses: actions/[email protected]
with:
# Artifact name
# 修改打包后的文件名称
name: # optional, default is artifact
SPATool-${{steps.create_release.outputs.tag}}-SNAPSHOT-all.jar
# A file, directory or wildcard pattern that describes what to upload
path:
target/*-SNAPSHOT-all.jar
# The desired behavior if no files are found using the provided path.
- name: Auto Upload Release
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{secrets.RELEASE}}
with:
# 修改打包后的文件名称
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/SPATool-${{ steps.create_release.outputs.tag }}-SNAPSHOT-all.jar
asset_name: SPATool-${{ steps.create_release.outputs.tag }}-SNAPSHOT-all.jar
asset_content_type: application/java-archive