-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.17 KB
/
java-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
50
51
name: build-java-release
on:
workflow_call:
inputs:
java_version:
required: true
type: string
jobs:
build-and-release-java:
permissions:
contents: write
runs-on: ubuntu-latest
timeout-minutes: 30
if: always()
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: ${{ inputs.java_version }}
distribution: "temurin"
cache: "maven"
- name: Build with Maven
run: mvn --batch-mode install -DskipTests
- name: Upload the produced artefacts
uses: actions/upload-artifact@v4
with:
name: invitebuilds
path: |
**/target/*.jar
**/target/*.zip
retention-days: 1
if: github.event_name == 'workflow_dispatch'
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
**/target/*.jar
**/target/*.zip
token: ${{ secrets.GITHUB_TOKEN }}
generate_release_notes: true
if: github.event_name != 'workflow_dispatch'