-
Notifications
You must be signed in to change notification settings - Fork 5
48 lines (46 loc) · 1.46 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
40
41
42
43
44
45
46
47
48
name: Release
permissions:
contents: write
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
tag:
required: true
type: string
description: Use this existing Git tag to create the release
jobs:
release:
name: Create Release
timeout-minutes: 10
strategy:
matrix:
os: [ ubuntu-22.04 ]
java: [ "11" ]
runs-on: ${{ matrix.os }}
env:
TAG: ${{ github.event.inputs.tag }}
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Get short TAG
if: ${{ github.event_name != 'workflow_dispatch' }}
run: |
echo "Retrieving tag from Github ref"
echo "TAG=$(basename "${{ github.ref }}")" >> $GITHUB_ENV
- name: Build JAR artifacts
run: mvn --batch-mode --no-transfer-progress --errors --update-snapshots clean package -Drevision=${TAG}
- name: Create Github Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Creating release from tag ${TAG}"
gh release create ${TAG} --generate-notes LICENSE NOTICE THIRD-PARTY-LICENSES README.md target/*.jar target/components/packages/*.zip