-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (39 loc) · 1.14 KB
/
build.yaml
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
name: buildTarget
on:
push:
branches:
- master
tags:
- 'v*'
jobs:
buildZxsCloudTarget:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 1.8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'adopt'
cache: maven
- name: Build with Maven
run: mvn -B -e -DskipTests=true package
- name: Copy Build
run: mkdir build && cp **/target/*.jar build
- name: Zip the Build
run: zip -r zxsIotCloud.zip build/
- name: Set Release version env variable
run: |
echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref }}
name: Release ${{ github.ref }}
body_path: ${{ github.workspace }}-doc/CHANGELOG.txt
files: |
Release.txt
LICENSE
zxsIotCloud.zip
token: ${{ secrets.RELEASE_TOKEN }}