-
Notifications
You must be signed in to change notification settings - Fork 86
46 lines (37 loc) · 1.35 KB
/
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
# This workflow will run every time a new release is created.
# It will first build the plugin using Maven, then publish it to GitHub packages and finally attach the artifacts to the release
name: Build and release
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 21
- name: Setup workspace
run: mkdir artifacts
- name: Build with Maven
run: |
mvn -B -s .github/workflows/settings.xml install --file pom.xml
cp MarriageMaster/target/M*.jar artifacts/
- name: Build with Maven (Standalone)
run: |
mvn -B -s .github/workflows/settings.xml clean install --file pom.xml -P Standalone,ExcludeBadRabbit
mv MarriageMaster/target/M*-Standalone.jar artifacts/
- name: Build with Maven (Release)
run: |
mvn -B -s .github/workflows/settings.xml clean package --file pom.xml -P Release
mv MarriageMaster/target/M*-Release.jar artifacts/
- name: Upload the artifacts
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: 'artifacts/M*'