-
Notifications
You must be signed in to change notification settings - Fork 14
46 lines (44 loc) · 1.28 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
name: Release
on:
push:
tags:
- "**"
branches-ignore:
- "**"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
- name: Cache
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Set POM Version
run: mvn versions:set versions:commit -DnewVersion=${{ github.ref_name }}
- name: Build Jar
run: mvn --batch-mode clean package -P cli
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy Jar
run: mvn --batch-mode deploy -Djacoco.skip=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release to GitHub
uses: softprops/action-gh-release@v1
with:
name: Version ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
draft: true
files: target/commons-ip2-cli-${{ github.ref_name }}.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}