-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (45 loc) · 1.3 KB
/
build.yml
File metadata and controls
55 lines (45 loc) · 1.3 KB
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
52
53
54
55
name: CoreAPI | Build and deploy
on:
workflow_call:
inputs:
version:
description: 'The version of the new build.'
required: true
type: string
isRelease:
description: 'Is this a release build?'
required: true
type: boolean
permissions:
contents: write
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up to JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
cache: 'maven'
java-version: 21
- name: Set Project Version
run: mvn versions:set -DnewVersion=${{ inputs.version }}
- name: Build with Maven
run: mvn -B clean package
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy to GitHub Packages # Repository is set in pom.xml
run: mvn deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload assets to release
if: ${{ inputs.isRelease }}
uses: softprops/action-gh-release@v0.1.15
with:
files: |
target/api-${{ inputs.version }}.jar
target/api-${{ inputs.version }}-sources.jar
target/api-${{ inputs.version }}-javadoc.jar