-
Notifications
You must be signed in to change notification settings - Fork 19
49 lines (47 loc) · 1.52 KB
/
create-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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Create Release
on:
push:
branches:
- master
jobs:
create-release:
if: "startsWith(github.event.head_commit.message, 'v')"
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: '17'
java-package: jdk # optional (jdk or jre) - defaults to jdk
cache: 'maven'
- name: Build with Maven
run: mvn clean install
- name: Create Prerelease
if: ${{contains(github.event.head_commit.message, '-SNAPSHOT')}}
id: create_prerelease
uses: softprops/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ChatEx ${{ github.event.head_commit.message }}
tag_name: ${{ github.event.head_commit.message }}
files: target/ChatEx.jar
generate_release_notes: true
prerelease: true
- name: Create Release
if: ${{!contains(github.event.head_commit.message, '-SNAPSHOT')}}
id: create_release
uses: softprops/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ChatEx ${{ github.event.head_commit.message }}
tag_name: ${{ github.event.head_commit.message }}
files: target/ChatEx.jar
generate_release_notes: true