-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (32 loc) · 1.01 KB
/
release.yaml
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
name: Build and Release
on:
push:
branches:
- main # Change this to your default branch if it's not 'main'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '11' # Change this to your required Java version
- name: Build with Maven
run: mvn clean package
- name: Get version from pom.xml
id: get_version
run: |
VERSION=$(grep -oPm1 "(?<=<version>)[^<]+" pom.xml)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.VERSION }}
release_name: Release ${{ env.VERSION }}
body: |
This release includes the JAR file built from the latest commit.
files: target/mateo-screenshot-tool.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}