-
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.31 KB
/
gradle.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
47
48
name: Create release
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradlew-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradlew-
- name: Retrieve current version number before release
run: sh gradlew printVersion
- name: Create release tag
id: createRelease
run: |
sh gradlew shadowJar releaseVersion --no-commit
- name: Push new tag
run: |
git push origin --tags
- name: Create GitHub release
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
version=v$(sh gradlew -q printVersion)
tag=$(git describe --tags --abbrev=0)
sh gradlew -q printChangeLog | gh release create $tag --latest -t "$version" -F - ${{ github.workspace }}/plugin/build/libs/*.jar ${{ github.workspace }}/api/build/libs/*.jar