-
Notifications
You must be signed in to change notification settings - Fork 9
33 lines (29 loc) · 957 Bytes
/
release.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
name: "create release with assets"
on:
push:
# Run for tagged commits, the tag name should be X.Y.Z to be used as version in pom.xml
tags:
- '[1-9]*'
jobs:
publish:
name: "release"
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: "check out code"
uses: actions/checkout@v4
- name: "set up JDK"
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
cache: 'maven'
- name: "set version from tag in all pom.xml to $GITHUB_REF_NAME"
run: "mvn versions:set -DnewVersion=$GITHUB_REF_NAME ; mvn versions:commit"
- name: "compile and build package"
run: mvn -B clean install
- name: "create release and upload assets"
uses: ncipollo/release-action@v1
with:
artifacts: "chat-server/target/chat_service.jar,chat-client-java-lib/target/chat-client-java-lib.jar"