-
Notifications
You must be signed in to change notification settings - Fork 57
45 lines (38 loc) · 1.27 KB
/
tagbuild.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
name: tagbuild
on:
push:
tags:
- 'release*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Check plugin version matches release tag
run: |
# Read the version from the Gradle properties
version=$(./gradlew -q --no-daemon properties -Pversion | grep version: | awk '{print $2}')
# Check that the version matches the tag
if [[ "$version" != "${GITHUB_REF#refs/tags/release}" ]]; then
echo "Version $version does not match tag ${GITHUB_REF#refs/tags/}"
exit 1
fi
- name: Generate release notes
run: |
./gradlew -q getChangelog --no-header --project-version="${GITHUB_REF#refs/tags/release}" > release-notes.txt
- name: Build with Gradle
run: |
./gradlew verifyPlugin
- name: Upload to releasex
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
body_path: release-notes.txt
files: build/libs/SmartTomcat-*.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}