-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (28 loc) · 801 Bytes
/
Copy pathrelease.yml
File metadata and controls
35 lines (28 loc) · 801 Bytes
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
name: Build and Release Plugin
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '21'
- name: Build with Maven
run: mvn clean package
- name: Get current version from the pom.xml
id: get_version
run: echo "VERSION=$(awk -F '[<>]' '/<version>/ {print $3; exit}' pom.xml)" >> $GITHUB_ENV
- name: Upload JAR to release
uses: softprops/action-gh-release@v1
with:
files: target/*.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}