@@ -10,55 +10,76 @@ jobs:
10
10
create-realese :
11
11
name : Create Release
12
12
runs-on : ubuntu-latest
13
+ strategy :
14
+ matrix :
15
+ java_version : [ '17' ]
16
+ node_version : [ '20' ]
13
17
outputs :
14
18
upload_url : ${{ steps.create_release.outputs.upload_url }}
15
19
steps :
16
- - name : Checkout code
17
- uses : actions/checkout@v2
20
+ - uses : actions/checkout@v4
21
+ - uses : actions/cache@v4
22
+ with :
23
+ path : |
24
+ ~/.m2
25
+ ~/.npm
26
+ ~/.cache
27
+ key : ${{ runner.os }}-build-${{ github.sha }}
28
+ restore-keys : ${{ runner.os }}-build-
29
+
18
30
- name : Get version
19
31
id : get_version
20
32
run : |
21
33
TAG=$(basename ${GITHUB_REF})
22
- echo "::set-output name=TAG::$TAG"
34
+ echo "TAG=$TAG" >> $GITHUB_OUTPUT
35
+
23
36
- name : Create Release
24
37
id : create_release
25
- uses : release-drafter/release-drafter@v5
38
+ uses : release-drafter/release-drafter@v6
26
39
env :
27
40
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
28
41
with :
29
42
config-name : release-config.yml
30
43
version : ${{ steps.get_version.outputs.TAG }}
31
44
tag : ${{ steps.get_version.outputs.TAG }}
32
- - uses : actions/setup-node@v3
45
+
46
+ - uses : actions/setup-node@v4
33
47
with :
34
- node-version : ' 20.15'
48
+ node-version : ${{ matrix.node_version }}
49
+
50
+ - uses : actions/setup-java@v4
51
+ with :
52
+ distribution : ' oracle'
53
+ java-version : ${{ matrix.java_version }}
54
+
35
55
- name : Build web
36
56
run : |
37
57
cd frontend
38
58
yarn install
39
59
yarn build
40
- - uses : actions/setup-java@v3
41
- with :
42
- distribution : ' temurin'
43
- java-version : ' 17'
60
+
44
61
- name : Build chen
45
62
run : |
46
63
mvn clean package -DskipTests
47
64
mkdir -p build chen-${{ steps.get_version.outputs.TAG }}
48
65
rm -f config/application-dev.yml
66
+ mv README.md chen-${{ steps.get_version.outputs.TAG }}/README.md
67
+ mv LICENSE chen-${{ steps.get_version.outputs.TAG }}/LICENSE
68
+ mv entrypoint.sh chen-${{ steps.get_version.outputs.TAG }}/entrypoint.sh
49
69
mv backend/web/target/web-*.jar chen-${{ steps.get_version.outputs.TAG }}/chen.jar
50
70
mv drivers chen-${{ steps.get_version.outputs.TAG }}/drivers
51
71
mv config chen-${{ steps.get_version.outputs.TAG }}/config
52
72
tar -zcvf chen-${{ steps.get_version.outputs.TAG }}.tar.gz chen-${{ steps.get_version.outputs.TAG }}
53
73
echo $(md5sum chen-${{ steps.get_version.outputs.TAG }}.tar.gz | awk '{print $1}') > build/chen-${{ steps.get_version.outputs.TAG }}.tar.gz.md5
54
74
mv chen-${{ steps.get_version.outputs.TAG }}.tar.gz build/
75
+
55
76
- name : Release Upload Assets
56
- uses : softprops/action-gh-release@v1
77
+ uses : softprops/action-gh-release@v2
57
78
if : startsWith(github.ref, 'refs/tags/')
58
79
with :
59
80
draft : true
60
81
files : |
61
- build/chen-${{ steps.get_version.outputs.TAG }}.tar .gz
62
- build/chen-${{ steps.get_version.outputs.TAG }}.tar.gz .md5
82
+ build/* .gz
83
+ build/* .md5
63
84
env :
64
85
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments