-
Notifications
You must be signed in to change notification settings - Fork 6
50 lines (41 loc) · 1.15 KB
/
Copy pathrelease.yml
File metadata and controls
50 lines (41 loc) · 1.15 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
name: Auto Release
on:
push:
tags:
- "v*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Extract version from tag
id: get_version
run: |
VERSION="${GITHUB_REF#refs/tags/v}"
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Show version
run: echo "Version is $VERSION"
- name: Update version in pom.xml
run: |
mvn -q versions:set -DnewVersion="$VERSION"
mvn -q versions:commit
- name: Set up Amazon Corretto 11
uses: actions/setup-java@v3
with:
distribution: corretto
java-version: "11"
cache: maven
- name: Build artifacts (without tests)
run: mvn -B -DskipTests clean package
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
draft: false
prerelease: false
files: |
target/*.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}