-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.37 KB
/
release-package.yml
File metadata and controls
55 lines (46 loc) · 1.37 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: Release Package
on:
push:
tags:
- "v*"
jobs:
release:
name: Build and Publish
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "21"
cache: maven
server-id: github
settings-path: ${{ github.workspace }}
- name: Verify build
run: mvn -B -ntp verify
- name: Resolve artifact name
run: echo "TARGET_NAME=$(mvn -q -DforceStdout help:evaluate -Dexpression=project.build.finalName)" >> "$GITHUB_ENV"
- name: Upload distributable
uses: actions/upload-artifact@v4
with:
name: dist
path: target/${{ env.TARGET_NAME }}.jar
- name: Publish to GitHub Packages (Maven)
run: mvn -B -ntp -DskipTests deploy -s "$GITHUB_WORKSPACE/settings.xml"
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
name: DataProvider ${{ github.ref_name }}
draft: false
prerelease: false
generate_release_notes: true
files: target/${{ env.TARGET_NAME }}.jar